facebookresearch / MUSE

A library for Multilingual Unsupervised or Supervised word Embeddings
Other
3.18k stars 551 forks source link

AssertionError while training #166

Closed iamsainianuj closed 4 years ago

iamsainianuj commented 4 years ago

Hello i came to know about MUSE and i really liked it and want to do some hands on so what i have done:

Trained my own corpus of two languages English and Hindi with fasttext(dim=300), i don't want to use any dictionary, i just want the mappings so that for some english words i can translate them to hindi with the help of mapping(W), but when i used the unsupervised.py to learn mapping with the following command

python unsupervised.py --src_lang en --tgt_lang hi --src_emb my/folder/en.vec --tgt_emb my/folder/hi.vec --n_refinement 5

i encountered following assertions error:

Traceback (most recent call last): File "unsupervised.py", line 118, in trainer.dis_step(stats) File "/home/anuj/MUSE/src/trainer.py", line 90, in dis_step x, y = self.get_dis_xy(volatile=True) File "/home/anuj/MUSE/src/trainer.py", line 61, in get_dis_xy assert mf <= min(len(self.src_dico), len(self.tgt_dico)) AssertionError

Kindly help me out.

Thank you.

iamsainianuj commented 4 years ago

changed the value of "--dis_most_frequent" from 7500(default) to 5000 and it executed without error