|View source on GitHub|
Get attention probabilities from the cell state.
tfa.seq2seq.beam_search_decoder.get_attention_probs( next_cell_state, coverage_penalty_weight )
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.