Pytorch cudnn RNN backward can only be called in training mode

You could call either

  • call .train() on the rnn module after using model.eval()
  • call .eval() only on the necessary modules
  • or disable cudnn via torch.backends.cudnn.enabled = False
2 Likes