Skip to content
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

Are you still updating the code? #12

Open
yjyGo opened this issue Mar 5, 2019 · 2 comments
Open

Are you still updating the code? #12

yjyGo opened this issue Mar 5, 2019 · 2 comments

Comments

@yjyGo
Copy link

yjyGo commented Mar 5, 2019

Thank you for helping me a lot, due to your code. Sorry, but I met some code problems that I can't solve. Looking forward to your updating!

@yjyGo
Copy link
Author

yjyGo commented Mar 11, 2019

When I try to run the function pre_rl_train(pre_grl_config), I met problem as follows:

`Traceback (most recent call last):
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_train.py", line 479, in
tf.app.run()
File "/home/yangjy/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_train.py", line 470, in main
pre_rl_train(pre_grl_config)
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_train.py", line 192, in pre_rl_train
rl_model = create_rl_model(sess, rl_config=rl_config, forward_only=False, name_scope=rl_config.name_model)
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_train.py", line 102, in create_rl_model
rl_model = grl_rnn_model.grl_model(grl_config=rl_config, name_scope=name_scope, forward=forward_only)
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_rnn_model.py", line 122, in init
softmax_loss_function=softmax_loss_function)
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_seq2seq.py", line 474, in model_with_buckets
decoder_inputs[:bucket[1]])
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_rnn_model.py", line 121, in
seq2seq=lambda x, y: seq2seq_f(x, y, tf.where(self.forward_only, True, False)),
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_rnn_model.py", line 98, in seq2seq_f
dtype=dtype
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_seq2seq.py", line 398, in embedding_attention_seq2seq
lambda: decoder(False))
File "/home/yangjy/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 432, in new_func
return func(*args, **kwargs)
File "/home/yangjy/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2040, in cond
orig_res_t, res_t = context_t.BuildCondBranch(true_fn)
File "/home/yangjy/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 1890, in BuildCondBranch
original_result = fn()
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_seq2seq.py", line 397, in
lambda: decoder(True),
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_seq2seq.py", line 390, in decoder
beam_size=beam_size)
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_seq2seq.py", line 315, in embedding_attention_decoder
scope=scope)
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_seq2seq.py", line 87, in beam_rnn_decoder
scope=scope)
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_beam_decoder.py", line 526, in beam_decoder
return helper.decode_dense()
File "/home/yangjy/PycharmProjects/Deep-Reinforcement-Learning-for-Dialogue-Generation-in-tensorflow-master/grl_beam_decoder.py", line 492, in decode_dense
emit_ta, final_state, final_loop_state = tf.nn.raw_rnn(self.cell, self.loop_fn, scope=self.scope)
File "/home/yangjy/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/rnn.py", line 1144, in raw_rnn
swap_memory=swap_memory)
File "/home/yangjy/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 3209, in while_loop
result = loop_context.BuildLoop(cond, body, loop_vars, shape_invariants)
File "/home/yangjy/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2941, in BuildLoop
pred, body, original_loop_vars, loop_vars, shape_invariants)
File "/home/yangjy/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2915, in _BuildLoop
next_vars.append(_AddNextAndBackEdge(m, v))
File "/home/yangjy/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 661, in _AddNextAndBackEdge
_EnforceShapeInvariant(m, v)
File "/home/yangjy/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 599, in _EnforceShapeInvariant
assert input_t.shape == m_shape

AssertionError
`

anybody can help me?

@yjyGo
Copy link
Author

yjyGo commented Mar 11, 2019

what's wrong about this line code?
emit_ta, final_state, final_loop_state = tf.nn.raw_rnn(self.cell, self.loop_fn, scope=self.scope)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant