dmlc / gluon-nlp

NLP made easy
https://nlp.gluon.ai/
Apache License 2.0
2.56k stars 538 forks source link

TextCNN rand model downloads pretrained vectors even if not needed #1217

Closed avinashsai closed 4 years ago

avinashsai commented 4 years ago
  1. TextCNN rand model downloads pretrained word vectors even if not needed. rand model initializes word vectors randomly and updates in the training process. So, I think there is not need to download word vectors for this model.

  2. There should be a flag passed to _build_vocab function representing the type of model. If the model is other than rand, then pretrained vectors should be downloaded.

avinashsai commented 4 years ago

@leezu @eric-haibin-lin your thoughts on this?

avinashsai commented 4 years ago

@leezu I have code ready for this and iam able to reproduce the results as well. What do you think?

leezu commented 4 years ago

Yes, your proposal is sensible. Would you like to open a PR? Thank you.

avinashsai commented 4 years ago

Sure, will submit PR to this

avinashsai commented 4 years ago

Fixed via #1222