facebookresearch / MUSE

A library for Multilingual Unsupervised or Supervised word Embeddings
Other
3.17k stars 544 forks source link

ITERATIVE PROCRUSTES REFINEMENT : TypeError: 'NoneType' object is not subscriptable #162

Open saharghannay opened 4 years ago

saharghannay commented 4 years ago

Hi

I got this error when training unsupervised multilingual embeddings fr-en using this command line

python unsupervised.py" --exp_path MUSE --dis_most_frequent 0 --n_epochs 5 --cuda 1 --export 1 --src_lang fr --tgt_lang en --emb_dim 100 --max_vocab -1 --src_emb $fr_em --tgt_emb $de_em --refinement 1

Do you have an idea how can I fix this problem please

INFO - 04/06/20 22:18:02 - 0:37:15 - Shrinking the learning rate: 0.02260 -> 0.01130 INFO - 04/06/20 22:18:02 - 0:37:15 - ----> ITERATIVE PROCRUSTES REFINEMENT <----

INFO - 04/06/20 22:18:02 - 0:37:15 - * Reloading the best model from best_mapping.t7 ... INFO - 04/06/20 22:18:02 - 0:37:15 - Starting refinement iteration 0... INFO - 04/06/20 22:18:02 - 0:37:15 - Building the train dictionary ... WARNING - 04/06/20 22:18:03 - 0:37:17 - Empty intersection ... Traceback (most recent call last): File "MUSE/unsupervised.py", line 167, in trainer.procrustes() File "MUSE/src/trainer.py", line 174, in procrustes A = self.src_emb.weight.data[self.dico[:, 0]] TypeError: 'NoneType' object is not subscriptable

IT-coach-666 commented 4 years ago

I also encounter this problem too