View source on GitHub

Get attention probabilities from the cell state.

next_cell_state The next state from the cell, e.g. an instance of AttentionWrapperState if the cell is attentional.
coverage_penalty_weight Float weight to penalize the coverage of source sentence. Disabled with 0.0.

The attention probabilities with shape [batch_size, beam_width, max_time] if coverage penalty is enabled. Otherwise, returns None.

ValueError If no cell is attentional but coverage penalty is enabled.