RuntimeErrNo RNNmodule but error: cudnn RNN backward can only be called in training mode

I get this error on loss.backward() while the model is in training mode and I have no RNN module in my model.

It’s strange seeing this error if no RNN modules are used. Could you post the model definition, please?