getalp/Flaubert

RuntimeError: The size of tensor a (68729) must match the size of tensor b (13681) at non-singleton dimension 0

keloemma opened this issue · 0 comments

Hello, I tried to retrain Flaubert from last checkpoint on new data but it seems the size of my input do not correspond to what the system expects ? Do you know perhaps how can I solve it ?

Traceback (most recent call last):
File "train.py", line 391, in
main(params)
File "train.py", line 309, in main
trainer.mlm_step(lang1, lang2, params.lambda_mlm)
File "/home/getalp/kelodjoe/eXP/Flaubert/xlm/trainer.py", line 786, in mlm_step
self.optimize(loss)
File "/home/getalp/kelodjoe/eXP/Flaubert/xlm/trainer.py", line 261, in optimize
optimizer.step()
File "/home/getalp/kelodjoe/anaconda3/envs/env/lib/python3.6/site-packages/apex-0.1-py3.6-linux-x86_64.egg/apex/amp/initialize.py", line 242, in new_step
output = old_step(*args, **kwargs)
File "/home/getalp/kelodjoe/eXP/Flaubert/xlm/optim.py", line 136, in step
super().step(closure)
File "/home/getalp/kelodjoe/eXP/Flaubert/xlm/optim.py", line 72, in step
exp_avg.mul
(beta1).add_(1 - beta1, grad)
File "/home/getalp/kelodjoe/anaconda3/envs/env/lib/python3.6/site-packages/apex-0.1-py3.6-linux-x86_64.egg/apex/amp/wrap.py", line 101, in wrapper
return orig_fn(arg0, *args, **kwargs)
RuntimeError: The size of tensor a (68729) must match the size of tensor b (13681) at non-singleton dimension 0

Another question, I would like to use the system for the calssification task in the Flue benchmark but it is not explicit in you page where it is. I get the part for finetuning but after that how are we supposed to test the model finetuned ? Should we use our own created or is there a code for the classification task available ?
Best regards,