Coding RNN from Scratch

Hello :smile:

I wonder if thereā€™s any PyTorch tuturials already on coding RNNs, from scratch, (i.e. not using the builtin RNN modules), Iā€™m thinking of doing a quick tutorial showing how to do it.

Thereā€™s a really nice tutorial in TensorFlow, rnn from scratch, which I could port over, but Iā€™m pretty sure there much already be one out there already?

@smth, @apaszke, @colesbury, is there anything like this already in the docs, and would it be worth adding for teaching purposes?

For example the, hereā€™s the basic TF code for a vanilla rnn, and a GRU

I guess I could simplify this implementation of a lstm in PyTorch using basic modules

Thanks a lot for your feedback :slight_smile:

1 Like

there is the NLP tutorial in pytorch.org/tutorials but thatā€™s the closest that comes to it i think.

1 Like

Thanks @smth :smile:

Itā€™s fairly straightforward to implement a custom RNNs, by modifying the original torch code, like in the lstm example above.

@AjayTalati , It would be most amazing if you would port over the ā€œrnn from scratchā€ in TensorFlow, to pytorch. I would be most interested in it, as I believe would many people.

1 Like

+1
@AjayTalati, did you get a chance to write the tutorial?