(self)
return embeddings_VxD
Gets embedding weights.
Gets embedding weights.
Gets embedding weights .
def weights_VxD(self):
    """Gets embedding weights."""
    with tf.variable_scope("embeddings", reuse=tf.AUTO_REUSE):
      # Initialization is important here, and a normal distribution with stdev
      # equal to rsqrt hidden_size is significantly better than the default
      # initialization used for other layers (fan in / out avg).
      embeddings_VxD = tf.get_variable(
          self._name, [self._vocab_size, self._hidden_size],
          initializer=tf.random_normal_initializer(
              stddev=self._hidden_size**-0.5, dtype=self._dtype),
          dtype=self._dtype)
    return embeddings_VxD
def weights_VxD ( self ) : with tf . variable_scope ( "embeddings" , reuse = tf . AUTO_REUSE ) : # Initialization is important here, and a normal distribution with stdev # equal to rsqrt hidden_size is significantly better than the default # initialization used for other layers (fan in / out avg). embeddings_VxD = tf . get_variable ( self . _name , [ self . _vocab_size , self . _hidden_size ] , initializer = tf . random_normal_initializer ( stddev = self . _hidden_size ** - 0.5 , dtype = self . _dtype ) , dtype = self . _dtype ) return embeddings_VxD