Skip to content

when decoding,something wrong. #17

@ljsun

Description

@ljsun

hello, when I decode using eval model, something wrong,
could you help me?
the main information is:
Traceback (most recent call last):
File "run_summarization.py", line 845, in
tf.app.run()
File "/home/ices/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "run_summarization.py", line 841, in main
seq2seq.main(unused_argv)
File "run_summarization.py", line 810, in main
decoder.decode() # decode indefinitely (unless single_pass=True, in which case deocde the dataset exactly once)
File "/home/ices/zhangbowen/RLSeq2Seq/src/decode.py", line 115, in decode
best_hyp = beam_search.run_beam_search(self._sess, self._model, self._vocab, batch)
File "/home/ices/zhangbowen/RLSeq2Seq/src/beam_search.py", line 144, in run_beam_search
prev_encoder_es = encoder_es if FLAGS.use_temporal_attention else tf.stack([], axis=0))
File "/home/ices/zhangbowen/RLSeq2Seq/src/model.py", line 855, in decode_onestep
results = sess.run(to_return, feed_dict=feed) # run the decoder step
File "/home/ices/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 900, in run
run_metadata_ptr)
File "/home/ices/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1111, in _run
str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (4, 256) for Tensor 'prev_decoder_outputs:0', which has shape '(?, 4, 256)'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions