在张量流0.10.0rc0中加载预训练的模型

时间:2019-02-13 09:53:38

标签: tensorflow model

我尝试了以下代码:

`with tf.Session() as sess:
model = MY_Model(sess, len(vocab_embed_object.vocab_dict)-2)
selected_modelpath="./pretrained/model.ckpt.epoch-11"
print("Reading model parameters from %s" % selected_modelpath)
model.saver.restore(sess, selected_modelpath)
print("Model loaded.")`

遇到此错误

Unable to open table file ./pretrained/model.ckpt.epoch-11: Data loss: block checksum mismatch: perhaps your file is in a different file format and you need to use a different restore operator?

使用python 2和tensorflow 0.10.0rc0

0 个答案:

没有答案