liuyuemaicha / Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow

Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow
192 stars 75 forks source link

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

Open SeekPoint opened 7 years ago

SeekPoint commented 7 years ago

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.

liuyuemaicha commented 7 years ago

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

SeekPoint commented 7 years ago

@liuyuemaicha gang ba de ;) good job

RaymondTseng commented 7 years ago

@liuyuemaicha Has the project been finished now?

liuyuemaicha commented 7 years ago

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.

MarkWuNLP commented 7 years ago

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

Sunnee2018 commented 6 years ago

Have someone solved this problem?

Zachary-YL commented 5 years ago

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!

wywy136 commented 4 years ago

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

Best!