attention_wrapper_state {tfaddons}R Documentation

Attention Wrapper State

Description

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

Usage

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


[Package tfaddons version 0.10.0 Index]