(self, ids_BxI)
return weights_BxIxD
Maps IDs to embedding weights.
Maps IDs to embedding weights.
Maps IDs to embedding weights .
def _ids_to_weights(self, ids_BxI):
    """Maps IDs to embedding weights."""
    weights_BxIxD = tf.nn.embedding_lookup(self.weights_VxD, ids_BxI)
    weights_BxIxD *= self._hidden_size**0.5
    return weights_BxIxD
def _ids_to_weights ( self , ids_BxI ) : weights_BxIxD = tf . nn . embedding_lookup ( self . weights_VxD , ids_BxI ) weights_BxIxD *= self . _hidden_size ** 0.5 return weights_BxIxD