【发布时间】:2019-01-30 23:25:32
【问题描述】:
我有一个现有的训练模型(特别是 tensorflow word2vec https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/udacity/5_word2vec.ipynb)。我将现有模型恢复得很好:
model1 = tf.train.import_meta_graph("models/model.meta")
model1.restore(sess, tf.train.latest_checkpoint("model/"))
但我不知道如何使用新加载(和训练)的模型进行预测。如何使用恢复的模型进行预测?
编辑:
模型代码来自官方 tensorflow repo https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/word2vec/word2vec_basic.py
【问题讨论】:
标签: python tensorflow word2vec