Open TernTuring opened 7 years ago
tf.nn.rnn_cell 可以改为 tf.contrib.rnn 参考https://github.com/tensorflow/tensorflow/issues/7664 tf.contrib.legacy_seq2seq也得修改,不过还是出错,作者用的版本比较低,与其修改,我觉得不如直接降级tf版本好了
这个项目我也是想更新的,不过还没想好怎么玩好~~~ 所有tensorflow的contrib里面的代码,不是可能会被改,是肯定会被改,官方都不收contrib的issue~~
感谢作者,我按照另一个issue的都修改了一下,虽然不报错但是死活不生成model,我也是醉了……
官方都把translate模型下线了,官网文档那个seq2seq的介绍就是个渣渣~~~我一直在想能不能把模型写的更简单点~~~
我也包这个错,最终有解决方案吗?
我第4步报这个错,是啥原因呢: tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor:o find any matching files for ./model/model1/model [[Node: save/RestoreV2_15 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_15/tensor_names, save/RestoreV2_15/shape_and_sl
Caused by op 'save/RestoreV2_15', defined at: File "s2s.py", line 324
一般用全路径比较靠谱,s2s.py及train_model.sh里的几个相对路径都改为全路径可以解决上面的问题。 还有个FLAGS.test参数好像有点问题,训练时总是调test(),这个在需要train时强行让它掉train()了。
错误内容: /opt/chatbot/Seq2Seq_Chatbot_QA> ./train_model.sh dim: 6865 准备数据 bucket 0 中有数据 506206 条 bucket 1 中有数据 1091400 条 bucket 2 中有数据 726867 条 bucket 3 中有数据 217104 条 共有数据 2541577 条 W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations. Traceback (most recent call last): File "s2s.py", line 324, in
tf.app.run()
File "/usr/lib/python3.4/site-packages/tensorflow/python/platform/app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "s2s.py", line 319, in main
train()
File "s2s.py", line 129, in train
model = create_model(sess, False)
File "s2s.py", line 110, in create_model
dtype
File "/opt/chatbot/Seq2Seq_Chatbot_QA/s2s_model.py", line 31, in init
cell = tf.nn.rnn_cell.BasicLSTMCell(size)
AttributeError: 'module' object has no attribute 'rnn_cell'
谢谢
tensorflow版本为1.0.0