rasa/core/policies/embedding_policy.py
def _all_time_masks_from(
        final_state: 'TimeAttentionWrapperState'
    ) -> tf.Tensor:
        """Extract all time masks form final rnn cell state."""

        # reshape to (batch, time, memory_time) and ignore last time
        # because time_mask is created for the next time step
        return tf.transpose(final_state.all_time_masks.stack(),
                            [1, 0, 2])[:, :-1, :]
Extract all time masks form final rnn cell state.
Extract all time masks form final rnn cell state.
Extract all time masks form final rnn cell state .
def _all_time_masks_from(
        final_state: 'TimeAttentionWrapperState'
    ) -> tf.Tensor:
        return tf.transpose(final_state.all_time_masks.stack(),
                            [1, 0, 2])[:, :-1, :]
def _all_time_masks_from ( final_state : 'TimeAttentionWrapperState' ) -> tf . Tensor : return tf . transpose ( final_state . all_time_masks . stack ( ) , [ 1 , 0 , 2 ] ) [ : , : - 1 , : ]
Extract all time masks form final rnn cell state.
Extract all time masks form final rnn cell state .
"""Extract all time masks form final rnn cell state.""" # reshape to (batch, time, memory_time) and ignore last time # because time_mask is created for the next time step
final_state
'TimeAttentionWrapperState'