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?