-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
楼主的chat_bot_seq2seq_attention能跑起来吗? #49
Comments
把beam_search相关的注释打开才行。。。 |
看起来中文的项目确实漏洞百出啊 |
predict跑起来了吗 |
能predict 起来。但绝对不是你想像中那样子: |
嗯嗯,跑起来了,训练数据都是英文的,输入中文的话不知道能不能理解,确实答非所问 |
请问tf版本是多少?我在predict出错了。
|
不是tf的问题,训练和预测时不要用beam_search(beam_search=False) |
好的,谢谢,我测试一下。
Davion <[email protected]> 于2019年12月17日周二 下午5:09写道:
… 把beam_search相关的注释打开才行。。。
predict跑起来了吗
能predict 起来。但绝对不是你想像中那样子:
第一,输入输出都是英文
第二,效果很差
嗯嗯,跑起来了,训练数据都是英文的,输入中文的话不知道能不能理解,确实答非所问
请问tf版本是多少?我在predict出错了。
报错如下:
2019-12-17 14:15:28.290374: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: Input to reshape is a tensor with 1024 values, but the requested shape has 5120
[[Node: decoder/Reshape_4 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](decoder/AttentionWrapperZeroState/zeros_1, decoder/concat_4)]]
2019-12-17 14:15:28.290477: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: Input to reshape is a tensor with 1024 values, but the requested shape has 5120
[[Node: decoder/Reshape_4 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](decoder/AttentionWrapperZeroState/zeros_1, decoder/concat_4)]]
2019-12-17 14:15:28.290502: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: Input to reshape is a tensor with 1024 values, but the requested shape has 5120
[[Node: decoder/Reshape_4 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](decoder/AttentionWrapperZeroState/zeros_1, decoder/concat_4)]]
2019-12-17 14:15:28.290489: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: Input to reshape is a tensor with 1024 values, but the requested shape has 5120
[[Node: decoder/Reshape_4 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](decoder/AttentionWrapperZeroState/zeros_1, decoder/concat_4)]]
2019-12-17 14:15:28.290570: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: Input to reshape is a tensor with 1024 values, but the requested shape has 5120
[[Node: decoder/Reshape_4 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](decoder/AttentionWrapperZeroState/zeros_1, decoder/concat_4)]]
2019-12-17 14:15:28.290810: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: Input to reshape is a tensor with 1024 values, but the requested shape has 5120
[[Node: decoder/Reshape_4 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](decoder/AttentionWrapperZeroState/zeros_1, decoder/concat_4)]]
2019-12-17 14:15:28.290841: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: Input to reshape is a tensor with 1024 values, but the requested shape has 5120
[[Node: decoder/Reshape_4 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](decoder/AttentionWrapperZeroState/zeros_1, decoder/concat_4)]]
Traceback (most recent call last):
File "/home/zsq/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1323, in _do_call
return fn(*args)
File "/home/zsq/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1302, in _run_fn
status, run_metadata)
File "/home/zsq/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 1024 values, but the requested shape has 5120
[[Node: decoder/Reshape_4 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](decoder/AttentionWrapperZeroState/zeros_1, decoder/concat_4)]]
[[Node: encoder/rnn/All/_55 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_69_encoder/rnn/All", tensor_type=DT_BOOL, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]
不是tf的问题,训练和预测时不要用beam_search(beam_search=False)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#49?email_source=notifications&email_token=AGXLCIRC6VPUKAIADZNTX3DQZCJNTA5CNFSM4JI3OYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHBVY3I#issuecomment-566451309>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGXLCIVYI6IZVSSJR2ZID3TQZCJNTANCNFSM4JI3OYMQ>
.
--
Best regards,
Shengqiang
|
发现一些小错啊?
比如:
train.py 中的
“model.restore(sess, ckpt.model_checkpoint_path)”
应改为:
"model.saver.restore(sess, ckpt.model_checkpoint_path)"
predict.py 中的
from data_helpers import loadDataset, getBatches, sentence2enco
应改为:
from data_loader import loadDataset, getBatches, sentence2enco
predict跑起来还有其它一屏又一屏的错,我只是想问一下楼主,是否真能跑起来?
The text was updated successfully, but these errors were encountered: