Accessing gradients in eval mode

Before 1.0, I could call eval() on my model while setting requires_grad = True on the individual Variables, so I could inspect the gradients while dropout was turned off for the whole model. When I try this now (by setting requires_grad on the top level module), I get an error:

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

is there still a way to pull this off?

1 Like