I want to implement my own version of LSTM but I have a question to ask.
I am using this code (basic LSTM cell): https://github.com/jihunchoi/recurrent-batch-normalization-pytorch/blob/master/bnlstm.py 13
to modify the LSTM cell.
My question is if I use my version of LSTM and LSTM cell, will  loss.backward() update weights. Same for opt.step() .
Should I write code for loss to update weights and optimizer functions?