Hi
Going to this article (http://pytorch.org/tutorials/beginner/former_torchies/nn_tutorial.html 76) it looks like implementing a recurrence over a layer is just repeating the layer in the forward function while defining the network.
My question is:


Can I implement a Simple RNN this way? I couldn’t find any resources over this on the internet. For example, if I want to try a variant of LSTM or GRU could I define a class that has the new cell’s implementation and then just repeat it over time steps (i.e. sequence values in text).


Can I define recurrence over an arbitrary layer. Say, I want recurrence over a Linear layer. Could I just take the layer and implement recurrence over it by just looping through the layer  outputs and applying the same layer again?


Thanks for the awesome library!