I’m new to pytorch and have been following the many tutorials available. In the seq2seq tutorial, the encoder’s foward() method iterates over all GRU’s layer. I’m somewhat confused by this : I thought the RNN constructor took the amount of layers as a parameter. I therefore assumed you would not need to explicitly iterate over the RNN’s layers.
My question is : is this the proper way of coding a multi-layers rnn ? If not, how should one proceed ?
(link to tutorial : http://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html)