Next up, we are going to use the following structure to build the computational graph:
So, as mentioned previously, we are going to use an embedding layer that will try to learn a special real-valued representation for these words. Thus, the words will be fed as one-hot vectors. The idea is to train this network to build up the weight matrix.
So, let's start off by creating the input to our model:
train_graph = tf.Graph()#defining the inputs placeholders of the modelwith train_graph.as_default(): inputs_values = tf.placeholder(tf.int32, [None], name='inputs_values') labels_values = tf.placeholder(tf.int32, ...