AbrahamSanders / seq2seq-chatbot

A sequence2sequence chatbot implementation with TensorFlow.
MIT License
99 stars 56 forks source link

--enablesampling is broken #5

Open AbrahamSanders opened 6 years ago

AbrahamSanders commented 6 years ago

In chat: --beamwidth=0 --enablesampling

This causes a traceback:

Traceback (most recent call last):
  File "chat.py", line 43, in <module>
    model_dir = model_dir) as model:
  File "C:\Source\Repos\seq2seq-chatbot\seq2seq-chatbot\chatbot_model.py", line 112, in __init__
    self.predictions, self.predictions_seq_lengths = self._build_model()
  File "C:\Source\Repos\seq2seq-chatbot\seq2seq-chatbot\chatbot_model.py", line 492, in _build_model
    output_layer)
  File "C:\Source\Repos\seq2seq-chatbot\seq2seq-chatbot\chatbot_model.py", line 731, in _build_inference_decoder
    scope = decoder_scope)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\contrib\seq2seq\python\ops\decoder.py", line 323, in dynamic_decode
    swap_memory=swap_memory)
  File "C:\ProgramData\Anaconda3\lib\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 "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2941, in BuildLoop
    pred, body, original_loop_vars, loop_vars, shape_invariants)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2915, in _BuildLoop
    next_vars.append(_AddNextAndBackEdge(m, v))
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 661, in _AddNextAndBackEdge
    _EnforceShapeInvariant(m, v)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 599, in _EnforceShapeInvariant
    assert input_t.shape == m_shape
AssertionError