rasa/core/policies/embedding_policy.py
def _create_embed(self,
                      x: tf.Tensor,
                      layer_name_suffix: Text) -> tf.Tensor:
        """Create dense embedding layer with a name."""

        reg = tf.contrib.layers.l2_regularizer(self.C2)
        embed_x = tf.layers.dense(inputs=x,
                                  units=self.embed_dim,
                                  activation=None,
                                  kernel_regularizer=reg,
                                  name='embed_layer_{}'
                                       ''.format(layer_name_suffix),
                                  reuse=tf.AUTO_REUSE)
        return embed_x
Create dense embedding layer with a name.
Create dense embedding layer with a name.
Create dense embedding layer with a name .
def _create_embed(self,
                      x: tf.Tensor,
                      layer_name_suffix: Text) -> tf.Tensor:
        reg = tf.contrib.layers.l2_regularizer(self.C2)
        embed_x = tf.layers.dense(inputs=x,
                                  units=self.embed_dim,
                                  activation=None,
                                  kernel_regularizer=reg,
                                  name='embed_layer_{}'
                                       ''.format(layer_name_suffix),
                                  reuse=tf.AUTO_REUSE)
        return embed_x
def _create_embed ( self , x : tf . Tensor , layer_name_suffix : Text ) -> tf . Tensor : reg = tf . contrib . layers . l2_regularizer ( self . C2 ) embed_x = tf . layers . dense ( inputs = x , units = self . embed_dim , activation = None , kernel_regularizer = reg , name = 'embed_layer_{}' '' . format ( layer_name_suffix ) , reuse = tf . AUTO_REUSE ) return embed_x
Create dense embedding layer with a name.
Create dense embedding layer with a name .
"""Create dense embedding layer with a name."""
self
x
tf.Tensor
layer_name_suffix
Text