python - Tensorflow: tf.contrib.layers.embed_sequence -


i'm working on project fulfill text categorization. when dealing word-to-vector, i'm recommended use tensorflow.contrib.layers.embed_sequence. but, seems api not offer illustration of encoding method. so, wonder how api acutally works.

by way, using pydev pydev development , hava installed tensorflow module. program using tensorflow runs properly. when want open declaration of tf.contrib.layers.embed_sequence, says:

"nameerror: name tf not defined"... 

basically, can use tf.contrib.layers.embed_sequence in way,

word_embed = tf.contrib.layers.embed_sequence(                         features,                         vocab_size=vocab_size,                          embed_dim=embedding_size) 

for tutorial of embed_sequence, please checkout official doc or other answers on stackoverflow

for tutorial of text categorization, please checkout blog https://medium.com/@ilblackdragon/tensorflow-text-classification-615198df9231


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -