January 2019
Intermediate to advanced
342 pages
9h 17m
English
The variables and the other relevant definition for the video captioning model can be defined as follows:
Defining the weights associated with the Network with tf.device('/cpu:0'): self.word_emb = tf.Variable(tf.random_uniform([self.n_words, self.dim_hidden], -0.1, 0.1), name='word_emb') self.lstm1 = tf.nn.rnn_cell.BasicLSTMCell(self.dim_hidden, state_is_tuple=False) self.lstm2 = tf.nn.rnn_cell.BasicLSTMCell(self.dim_hidden, state_is_tuple=False) self.encode_W = tf.Variable( tf.random_uniform([self.dim_image,self.dim_hidden], -0.1, 0.1), name='encode_W') self.encode_b = tf.Variable( tf.zeros([self.dim_hidden]), name='encode_b') self.word_emb_W = tf.Variable(tf.random_uniform([self.dim_hidden,self.n_words], ...Read now
Unlock full access