eval() won’t work in this case, as it switches the behavior of certain layers like batchnorm and dropout layers.
Set the requires_grad attribute to False for self.out.weight and self.out.bias to fix these parameters.
EDIT: I was too slow, as @spanev already added the right approach