What is num_layers in RNN module?

No, your understanding is wrong. num_layers in RNN is just stacking RNNs on top of each other. So you get a hidden from each layer and an output only from the topmost layer.

5 Likes