rasa/core/policies/embedding_policy.py
def _sims_rnn_to_max_from(self, cell_output: tf.Tensor) -> List[tf.Tensor]:
        """Save intermediate tensors for debug purposes."""

        if self.attn_after_rnn:
            # extract additional debug tensors
            num_add = TimeAttentionWrapper.additional_output_size()
            self.copy_attn_debug = cell_output[:, :, -num_add:]

            # extract additional similarity to maximize
            sim_attn_to_max = cell_output[:, :, -num_add]
            sim_state_to_max = cell_output[:, :, -num_add + 1]
            return [sim_attn_to_max, sim_state_to_max]
        else:
            return []
Save intermediate tensors for debug purposes.
Save intermediate tensors for debug purposes.
Save intermediate tensors for debug purposes .
def _sims_rnn_to_max_from(self, cell_output: tf.Tensor) -> List[tf.Tensor]:
        if self.attn_after_rnn:
            num_add = TimeAttentionWrapper.additional_output_size()
            self.copy_attn_debug = cell_output[:, :, -num_add:]
            sim_attn_to_max = cell_output[:, :, -num_add]
            sim_state_to_max = cell_output[:, :, -num_add + 1]
            return [sim_attn_to_max, sim_state_to_max]
        else:
            return []
def _sims_rnn_to_max_from ( self , cell_output : tf . Tensor ) -> List [ tf . Tensor ] : if self . attn_after_rnn : num_add = TimeAttentionWrapper . additional_output_size ( ) self . copy_attn_debug = cell_output [ : , : , - num_add : ] sim_attn_to_max = cell_output [ : , : , - num_add ] sim_state_to_max = cell_output [ : , : , - num_add + 1 ] return [ sim_attn_to_max , sim_state_to_max ] else : return [ ]
Save intermediate tensors for debug purposes.
Save intermediate tensors for debug purposes .
"""Save intermediate tensors for debug purposes.""" # extract additional debug tensors # extract additional similarity to maximize
self
cell_output
tf.Tensor