Hello, I'm new and I trying to use this tool. I have downloaded the google word2vec pre-trained file (GoogleNews-vectors-negative300.bin.gz). Then, I use the example code
import tensorflow as tf
from gensim.models import KeyedVectors
from skip_thoughts import SkipThoughts
# Initialize the word2vec and skip-thoughts models only once:
word2vec_model = KeyedVectors.load('GoogleNews-vectors-negative300.bin.gz', mmap='r')
graph = tf.Graph()
with graph.as_default():
# Refer to the constructor docstring for more information on the arguments.
model = SkipThoughts(word2vec_model, **kwargs) # What params have to put ?
with tf.Session(graph=graph):
# Restore the model only once.
# Here, `save_dir` is the directory where the .ckpt files live. Typically
# this would be "output/mymodel" where --model_name=mymodel in train.py.
model.restore(save_dir)
# Run the model like this as many times as desired.
print(model.encode(sentence_strings))
Put in keyVectorload the file downloaded, but then when I run, got errors.
I need some basic tutorial for test the example. please.
I'm trying to enconde simple sentences and then I want to use that for train a classifier.
And I read that with skip-thoughts are obtained good results and I want to test.
My question are:
Where I put sentences?
I need train some model or pre-trained file is enough ?
Please, I need help.
Thanks !
Hello, I'm new and I trying to use this tool. I have downloaded the google word2vec pre-trained file (GoogleNews-vectors-negative300.bin.gz). Then, I use the example code
Put in keyVectorload the file downloaded, but then when I run, got errors.
I need some basic tutorial for test the example. please.
I'm trying to enconde simple sentences and then I want to use that for train a classifier.
And I read that with skip-thoughts are obtained good results and I want to test.
My question are:
Where I put sentences?
I need train some model or pre-trained file is enough ?
Please, I need help.
Thanks !