tensorflow-glove icon indicating copy to clipboard operation
tensorflow-glove copied to clipboard

A way to save trained word vectors?

Open park opened this issue 7 years ago • 4 comments

Nice work!

Is there a way to save the trained word vectors into text or binary files for later use?

Thanks.

park avatar Apr 04 '17 13:04 park

checkpoints are one way, https://www.tensorflow.org/programmers_guide/variables#checkpoint_files

EddieOne avatar May 29 '17 08:05 EddieOne

I think given that the tensorflow graph node implementation has shape that is reliant on the vocab size, evaluating it into a numpy array and saving the parameters into a pickle file would be more effficient. Otherwise if by using checkpoint, one would have to load the model with old graph with the nodes shape of old vocab size, recreate the graph with the new vocab size after fitting the model to corpus.

MrRexZ avatar Jun 18 '17 03:06 MrRexZ

nice work

Seafoodair avatar Feb 02 '20 01:02 Seafoodair

I forgot to post it, I did manage this. https://github.com/EddieOne/tf-glove-deluxe

EddieOne avatar Feb 02 '20 02:02 EddieOne