The error message:



 Amith_Adiraju:

RuntimeError: cudnn RNN backward can only be called in training mode


claims you are running an RNN module in training mode and try to call backward() somewhere.
However, your ABC model doesn’t use any RNNs, so it seems you missed some code parts or the error is thrown from some other code parts.
If you are using a Jupyter notebook, make sure to restart the notebook.