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

fixed issue number 83:84 Error for attention state missing #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion core/sync_attention_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def call(self, inputs, state):
rnn_cell_state = state.cell_state.h
else:
rnn_cell_state = state.cell_state
attention, alignments = _compute_attention(

attention, alignments,attention_state = _compute_attention(
attention_mechanism, rnn_cell_state, previous_alignments[i],
self._attention_layers[i] if self._attention_layers else None)
alignment_history = previous_alignment_history[i].write(
Expand All @@ -66,6 +67,7 @@ def call(self, inputs, state):

next_state = seq2seq.AttentionWrapperState(
time=state.time + 1,
attention_state=attention_state,
cell_state=next_cell_state,
attention=attention,
alignments=self._item_or_tuple(all_alignments),
Expand Down