I am a little confused about this. I understand that RNNcell does the forward pass one time step at a time, whereas RNN processes the full sequence.
However, in the seq2seq tutorial, at evaluation time a RNN (not RNNcell) is being run one timestep at a time, and its output is being fed back as input for next timestep.
- If I use the RNN module in this way, but during training, i.e. one step at a time and feed the o/p back as i/p, would it be equivalent to using RNNcell? (but a little faster because cuDNN)
- If I can use a RNN module like this, in what situation would i need to use a RNNcell as opposed to RNN?
I also wonder why it need to step by step for the sequence during the training process.
for ei in range(input_length):
encoder_output, encoder_hidden = encoder(
encoder_outputs[ei] = encoder_output
The input has the size (seq, batch, embedding).
- If you need to implement a variant of RNN, then you can base it on the code for RNNCell.
I can’t see any strong why the input should be fed in one step at a time. Maybe the code is slightly simpler that way.
@jpeg729 Thanks! that clears it up for me.
@Derek I am not sure, but it maybe incase you want to feed the output back as input, i.e. train without teacher forcing, which I dont think you can do without looping