Gluon NLP: How to import my own pretrained W2V?


#1

Hello. I’m trying to import a W2V model trained with gensim for use in an embedding layer. I expected to be able to use

gluonnlp.embedding.Word2Vec(source=pathToW2VModel)

to simply load my own models, but I can’t do this because it is not one of the predefined shipped models. I can do a workaround if necessary, but if there’s functionality for loading these formats why can I not specify my own files?

KeyError: ‘Cannot find pre-trained source for token embedding word2vec. Valid pre-trained file names for embedding word2vec: GoogleNews-vectors-negative300, freebase-vectors-skipgram1000-en, freebase-vectors-skipgram1000’