这里有人成功地用TensorFlow 1.4.1运行im2xt吗?在
我使用这个模型(https://drive.google.com/file/d/0B_qCJ40uBfjEWVItOTdyNUFOMzg/view)
2018-01-04 00:46:59.268582: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key lstm/basic_lstm_cell/kernel not found in checkpoint
然后我尝试使用下面的脚本来转换模型。脚本生成了检查点、.meta、.data和.index。在
^{pr2}$有谁能告诉我如何使用这些文件来运行带有TensorFlow 1.4.1的im2xt。(实际上,我可以用tensorflow 0.12.1运行im2text)
环境
python 3.5.2
Mac OS X 10.12.6版
TensorFlow 1.4.1
谢谢你的帮助。在
对于macos10.13上的tf1.4.1和python3.5,检查点文件也会出现相同的错误
原因:下载的检查点文件是使用旧版本的tensorflow(python2)生成的。字_计数.txt文件格式
来自https://github.com/KranthiGV/Pretrained-Show-and-Tell-model的答案
更改: 1生成可由tf1.4.1加载的ckp文件
python3文件读取问题,在im2text/run中_参考.py在
with tf.gfile.GFile(filename, "rb") as f:
字_计数.txt从那个链接下载的需要被这个替换 https://github.com/siavash9000/im2txt_demo/tree/master/im2txt_pretrained
春芳的解决方案对我有效,但我想分享另一种方法。在
在TensorFlow的最新版本中,Google提供了一个“官方”^{} 实用程序来转换旧的RNN检查点:
相关问题 更多 >
编程相关推荐