def _build_decoder_cell(self, hparams, encoder_outputs, encoder_state,
source_sequence_length):
"""Build a RNN cell with attention mechanism that can be used by decoder."""
Error:
File "/home/ml-ai4/Neel-dev023/ChatBot/nmt-chatbot/nmt/nmt/attention_model.py", line 144, in _build_decoder_cell
decoder_initial_state = cell.zero_state(batch_size=batch_size*hparams["beam_width"], dtype=dtype).clone(
File "/home/ml-ai4/Neel-dev023/ChatBot/nmt-chatbot/venv/lib/python3.6/site-packages/tensorflow_core/python/ops/rnn_cell_wrapper_impl.py", line 199, in zero_state
return self.cell.zero_state(batch_size, dtype)
File "/home/ml-ai4/Neel-dev023/ChatBot/nmt-chatbot/venv/lib/python3.6/site-packages/tensorflow_core/python/ops/rnn_cell_wrapper_impl.py", line 431, in zero_state
return self.cell.zero_state(batch_size, dtype)
AttributeError: 'AttentionWrapper' object has no attribute 'zero_state'
def _build_decoder_cell(self, hparams, encoder_outputs, encoder_state, source_sequence_length): """Build a RNN cell with attention mechanism that can be used by decoder."""
No Attention
Error: File "/home/ml-ai4/Neel-dev023/ChatBot/nmt-chatbot/nmt/nmt/attention_model.py", line 144, in _build_decoder_cell decoder_initial_state = cell.zero_state(batch_size=batch_size*hparams["beam_width"], dtype=dtype).clone( File "/home/ml-ai4/Neel-dev023/ChatBot/nmt-chatbot/venv/lib/python3.6/site-packages/tensorflow_core/python/ops/rnn_cell_wrapper_impl.py", line 199, in zero_state return self.cell.zero_state(batch_size, dtype) File "/home/ml-ai4/Neel-dev023/ChatBot/nmt-chatbot/venv/lib/python3.6/site-packages/tensorflow_core/python/ops/rnn_cell_wrapper_impl.py", line 431, in zero_state return self.cell.zero_state(batch_size, dtype) AttributeError: 'AttentionWrapper' object has no attribute 'zero_state'