attention_wrapper_state: Attention Wrapper State

Description Usage Arguments Value

Description

'namedlist' storing the state of a 'attention_wrapper'.

Usage

1
2
3
4
5
6
7
8
attention_wrapper_state(
  object,
  cell_state,
  attention,
  alignments,
  alignment_history,
  attention_state
)

Arguments

object

Model or layer object

cell_state

The state of the wrapped RNNCell at the previous time step.

attention

The attention emitted at the previous time step.

alignments

A single or tuple of Tensor(s) containing the alignments emitted at the previous time step for each attention mechanism.

alignment_history

(if enabled) a single or tuple of TensorArray(s) containing alignment matrices from all time steps for each attention mechanism. Call stack() on each to convert to a Tensor.

attention_state

A single or tuple of nested objects containing attention mechanism state for each attention mechanism. The objects may contain Tensors or TensorArrays.

Value

None


tfaddons documentation built on July 2, 2020, 2:12 a.m.