Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow icon indicating copy to clipboard operation
Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow copied to clipboard

expected int32 got list containing tensors of type '_message' instead

Open SeekPoint opened this issue 7 years ago • 8 comments

at

python grl_train.py Prepare Chitchat data in ./grl_data/ Tokenizing data in ./grl_data/chitchat.train.answer Tokenizing data in ./grl_data/chitchat.train.query Tokenizing data in ./grl_data/chitchat.dev.answer Tokenizing data in ./grl_data/chitchat.dev.query Reading development and training data (limit: 0). b_set length: 0 b_set length: 6 b_set length: 2 b_set length: 0 Creating st_model model with fresh parameters Created st_model model with fresh parameters Creating bk_model model with fresh parameters Created bk_model model with fresh parameters Creating cc_model model with fresh parameters Created cc_model model with fresh parameters Traceback (most recent call last): File "grl_train.py", line 473, in tf.app.run() File "/Users/venv/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 43, in run sys.exit(main(sys.argv[:1] + flags_passthrough)) File "grl_train.py", line 467, in main train() File "grl_train.py", line 261, in train rl_model = create_rl_model(sess, grl_config, False, grl_config.name_model) File "grl_train.py", line 99, in create_rl_model rl_model = grl_rnn_model.grl_model(grl_config=rl_config, name_scope=name_scope, forward=forward_only) File "/Users/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow/grl_rnn_model.py", line 123, in init softmax_loss_function=softmax_loss_function) File "/Users/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow/grl_seq2seq.py", line 477, in model_with_buckets decoder_inputs[:bucket[1]]) File "/Users/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow/grl_rnn_model.py", line 122, in seq2seq=lambda x, y: seq2seq_f(x, y, tf.select(self.forward_only, True, False)), File "/Users/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow/grl_rnn_model.py", line 99, in seq2seq_f dtype=dtype File "/Users/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow/grl_seq2seq.py", line 401, in embedding_attention_seq2seq lambda: decoder(False)) File "/Users/venv/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 1776, in cond orig_res, res_t = context_t.BuildCondBranch(fn1) File "/Users/venv/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 1677, in BuildCondBranch r = fn() File "/Users/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow/grl_seq2seq.py", line 400, in lambda: decoder(True), File "/Users/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow/grl_seq2seq.py", line 397, in decoder return outputs + state_list File "/Users/venv/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py", line 813, in binary_op_wrapper y = ops.convert_to_tensor(y, dtype=x.dtype.base_dtype, name="y") File "/Users/venv/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 669, in convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/Users/venv/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 176, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "/Users/venv/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 165, in constant tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape)) File "/Users/venv/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 367, in make_tensor_proto _AssertCompatible(values, dtype) File "/Users/venv/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible (dtype.name, repr(mismatch), type(mismatch).name)) TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

SeekPoint avatar Jun 09 '17 08:06 SeekPoint

Sorry,I haven't finished this project. Somewhere in the code may have bugs.

liuyuemaicha avatar Jun 10 '17 13:06 liuyuemaicha

@liuyuemaicha gang ba de ;) good job

SeekPoint avatar Jun 11 '17 10:06 SeekPoint

@liuyuemaicha Has the project been finished now?

RaymondTseng avatar Jul 27 '17 03:07 RaymondTseng

Sorry, I am studying on the zero-shot learning recently. I am interning in Hitachi now, so I have no time to do that, I will do my best to complete the program when I finish the project of zero-shot learning.

liuyuemaicha avatar Jul 27 '17 13:07 liuyuemaicha

Hi, It looks like the code cannot run until now? I also get the error when I run this code.

MarkWuNLP avatar Sep 18 '17 09:09 MarkWuNLP

Have someone solved this problem?

Sunnee2018 avatar Jun 22 '18 01:06 Sunnee2018

Hi, It looks like the code cannot run until now? I also get the error when I run this code.

Hello @MarkWuNLP, have you solved this problem? Or can you give some advice based on you rich experience?

Best!

Zachary-YL avatar May 03 '19 08:05 Zachary-YL

@MarkWuNLP Hello, have you solved this problem? Or can you give some advice based on you rich experience?

Best!

wywy136 avatar Nov 12 '19 15:11 wywy136