embedding_lookup | R Documentation |
Look up words embeddings for id tensor
embedding_lookup( input_ids, vocab_size, embedding_size = 128L, initializer_range = 0.02, word_embedding_name = "word_embeddings" )
input_ids |
Integer Tensor of shape [batch_size, seq_length] containing word ids. |
vocab_size |
Size of the embedding vocabulary (integer). |
embedding_size |
Width of the word embeddings (integer). |
initializer_range |
Embedding initialization range (float). |
word_embedding_name |
Name of the embedding table (character). |
Float Tensor of shape [batch_size, seq_length, embedding_size], along with the embedding table in a list.
## Not run: with( tensorflow::tf$variable_scope("examples", reuse = tensorflow::tf$AUTO_REUSE ), ids <- tensorflow::tf$get_variable("x", dtype = "int32", shape = tensorflow::shape(10, 20) ) ) embedding_lookup(ids, vocab_size = 100, word_embedding_name = "some_name") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.