In order to do "Inference" with a trained RNN/LSTM model for sentences one by one. I think I need to set the History input parameter of a RNN/LSTM cell to Zero at the beginning of each sentence.
So how can it be done in Tensorflow?
In order to do "Inference" with a trained RNN/LSTM model for sentences one by one. I think I need to set the History input parameter of a RNN/LSTM cell to Zero at the beginning of each sentence.
So how can it be done in Tensorflow?
Based on this answer I believe that the state is set back to whatever state you pass in with the initial_state
argument to tf.nn.rnn
(or the other RNN creation functions).