fairseq icon indicating copy to clipboard operation
fairseq copied to clipboard

bug in initialise the num_embedings

Open nichongjia opened this issue 7 years ago • 2 comments

In fairseq/models/fconv.py, it mentioned the FConvEncoder dictionary is optional. If I give the dictionary is None, then

num_embeddings = len(dictionary)

will have errors.

nichongjia avatar Sep 03 '19 02:09 nichongjia

dictionary is not optional: https://github.com/pytorch/fairseq/blob/e75cff5f2c1d62f12dc911e0bf420025eb1a4e33/fairseq/models/fconv.py#L140-L143

Why do you think it's optional?

myleott avatar Sep 03 '19 14:09 myleott

I'm closing this, it is not optional to have the dictionary.

huihuifan avatar Sep 17 '19 12:09 huihuifan