bkj / ulm-basenet Goto Github PK
View Code? Open in Web Editor NEWImplementation of ULMFit algorithm for text classification via transfer learning
Implementation of ULMFit algorithm for text classification via transfer learning
Hi Ben,
I ran the run.sh and everything works fine until train_classifier.py, here is the error:
train_epoch:train: 0%| | 0/1042 [00:00<?, ?it/s]
Traceback (most recent call last):
File "train_classifier.py", line 177, in <module>
save_prefix=os.path.join(args.outpath, 'cl_ft_last1'),
File "/home/david/ulm-basenet/ulmfit.py", line 455, in basenet_train
train = model.train_epoch(dataloaders, mode='train', compute_acc=False)
File "/home/david/anaconda3/envs/ulm_env/lib/python3.6/site-packages/basenet/basenet.py", line 255, in train_epoch
**kwargs,
File "/home/david/anaconda3/envs/ulm_env/lib/python3.6/site-packages/basenet/basenet.py", line 219, in _run_epoch
loss, metrics = batch_fn(data, target, metric_fns=metric_fns)
File "/home/david/anaconda3/envs/ulm_env/lib/python3.6/site-packages/basenet/basenet.py", line 164, in train_batch
grad_norm = torch.nn.utils.clip_grad_norm(self.params, self.clip_grad_norm)
File "/home/david/anaconda3/envs/ulm_env/lib/python3.6/site-packages/torch/nn/utils/clip_grad.py", line 18, in clip_grad_norm
parameters = list(filter(lambda p: p.grad is not None, parameters))
File "/home/david/anaconda3/envs/ulm_env/lib/python3.6/site-packages/torch/nn/utils/clip_grad.py", line 18, in <lambda>
parameters = list(filter(lambda p: p.grad is not None, parameters))
AttributeError: 'dict' object has no attribute 'grad'
Do you have any clue on how to resolve this?
Hi, I don't use fats.ai libraries, So was hoping if you could provide a working jupyter demo for ULM.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.