parameters: (x)
return_statement: return word_list
docstring: Customized function to transform batched x into embeddings.
docstring_summary: Customized function to transform batched x into embeddings.
docstring_tokens: Customized function to transform batched x into embeddings .
function: def input_op_fn(x):
    """Customized function to transform batched x into embeddings."""
    # Convert indexes of words into embeddings.
    # This creates embeddings matrix of [n_words, EMBEDDING_SIZE] and then
    # maps word indexes of the sequence into [batch_size, sequence_length,
    # EMBEDDING_SIZE].
    word_vectors = learn.ops.categorical_variable(x, n_classes=n_words,
        embedding_size=EMBEDDING_SIZE, name='words')
    # Split into list of embedding per word, while removing doc length dim.
    # word_list results to be a list of tensors [batch_size, EMBEDDING_SIZE].
    word_list = tf.unpack(word_vectors, axis=1)
    return word_list
function_tokens: def input_op_fn ( x ) : # Convert indexes of words into embeddings. # This creates embeddings matrix of [n_words, EMBEDDING_SIZE] and then # maps word indexes of the sequence into [batch_size, sequence_length, # EMBEDDING_SIZE]. word_vectors = learn . ops . categorical_variable ( x , n_classes = n_words , embedding_size = EMBEDDING_SIZE , name = 'words' ) # Split into list of embedding per word, while removing doc length dim. # word_list results to be a list of tensors [batch_size, EMBEDDING_SIZE]. word_list = tf . unpack ( word_vectors , axis = 1 ) return word_list