January 2019
Intermediate to advanced
342 pages
9h 17m
English
In the decoding stage the generation of the words for the video caption takes place. There are no more inputs to the LSTM 1. However the LSTM 1 is rolled forward and the hidden state produced is fed to the LSTM 2 time steps as before. The other input to the LSTM 2 at each step is the embedding vector for the preceding word in the caption. So at each step the LSTM 2 generates a new caption word conditioned on the word predicted in the previous time step along with the hidden state from LSTM 1 at that time step. The code for the decoder is as follows is :
# Decoding Stage to generate Captions for i in range(0, self.caption_lstm_step): with tf.device("/cpu:0"): current_embed = tf.nn.embedding_lookup(self.word_emb, caption[:, ...Read now
Unlock full access