parameters: (ids,
                     vocab_size=None,
                     embed_dim=None,
                     unique=False,
                     initializer=None,
                     regularizer=None,
                     trainable=True,
                     scope=None,
                     reuse=None)
docstring: Maps a sequence of symbols to a sequence of embeddings.
  
    Typical use case would be reusing embeddings between an encoder and decoder.
  
    Args:
      ids: `[batch_size, doc_length]` `Tensor` of type `int32` or `int64`
        with symbol ids.
      vocab_size: Integer number of symbols in vocabulary.
      embed_dim: Integer number of dimensions for embedding matrix.
      unique: If `True`, will first compute the unique set of indices, and then
           lookup each embedding once, repeating them in the output as needed.
      initializer: An initializer for the embeddings, if `None` default for
          current scope is used.
      regularizer: Optional regularizer for the embeddings.
      trainable: If `True` also add variables to the graph collection
        `GraphKeys.TRAINABLE_VARIABLES` (see `tf.Variable`).
      scope: Optional string specifying the variable scope for the op, required
          if `reuse=True`.
      reuse: If `True`, variables inside the op will be reused.
  
    Returns:
      `Tensor` of `[batch_size, doc_length, embed_dim]` with embedded sequences.
  
    Raises:
      ValueError: if `embed_dim` or `vocab_size` are not specified when
        `reuse` is `None` or `False`.
docstring_summary: Maps a sequence of symbols to a sequence of embeddings.
docstring_tokens: Maps a sequence of symbols to a sequence of embeddings .
function: def embed_sequence(ids,
                     vocab_size=None,
                     embed_dim=None,
                     unique=False,
                     initializer=None,
                     regularizer=None,
                     trainable=True,
                     scope=None,
                     reuse=None):
    """Maps a sequence of symbols to a sequence of embeddings.
  
    Typical use case would be reusing embeddings between an encoder and decoder.
  
    Args:
      ids: `[batch_size, doc_length]` `Tensor` of type `int32` or `int64`
        with symbol ids.
      vocab_size: Integer number of symbols in vocabulary.
      embed_dim: Integer number of dimensions for embedding matrix.
      unique: If `True`, will first compute the unique set of indices, and then
           lookup each embedding once, repeating them in the output as needed.
      initializer: An initializer for the embeddings, if `None` default for
          current scope is used.
      regularizer: Optional regularizer for the embeddings.
      trainable: If `True` also add variables to the graph collection
        `GraphKeys.TRAINABLE_VARIABLES` (see `tf.Variable`).
      scope: Optional string specifying the variable scope for the op, required
          if `reuse=True`.
      reuse: If `True`, variables inside the op will be reused.
  
    Returns:
      `Tensor` of `[batch_size, doc_length, embed_dim]` with embedded sequences.
  
    Raises:
      ValueError: if `embed_dim` or `vocab_size` are not specified when
        `reuse` is `None` or `False`.
    """
    if not (reuse or (vocab_size and embed_dim)):
      raise ValueError('Must specify vocab size and embedding dimension when not'
                       'reusing. Got vocab_size=%s and embed_dim=%s' % (
                           vocab_size, embed_dim))
    with variable_scope.variable_scope(
        scope, 'EmbedSequence', [ids], reuse=reuse):
      shape = [vocab_size, embed_dim]
      if reuse and vocab_size is None or embed_dim is None:
        shape = None
      embeddings = variables.model_variable(
          'embeddings', shape=shape,
          initializer=initializer, regularizer=regularizer,
          trainable=trainable)
      if unique:
        return contrib_embedding_ops.embedding_lookup_unique(embeddings, ids)
      return embedding_ops.embedding_lookup(embeddings, ids)
function_tokens: def embed_sequence ( ids , vocab_size = None , embed_dim = None , unique = False , initializer = None , regularizer = None , trainable = True , scope = None , reuse = None ) : if not ( reuse or ( vocab_size and embed_dim ) ) : raise ValueError ( 'Must specify vocab size and embedding dimension when not' 'reusing. Got vocab_size=%s and embed_dim=%s' % ( vocab_size , embed_dim ) ) with variable_scope . variable_scope ( scope , 'EmbedSequence' , [ ids ] , reuse = reuse ) : shape = [ vocab_size , embed_dim ] if reuse and vocab_size is None or embed_dim is None : shape = None embeddings = variables . model_variable ( 'embeddings' , shape = shape , initializer = initializer , regularizer = regularizer , trainable = trainable ) if unique : return contrib_embedding_ops . embedding_lookup_unique ( embeddings , ids ) return embedding_ops . embedding_lookup ( embeddings , ids )