For those that have this error, it is often that you have loaded a pre-trained model in your dataset and didn't put it into eval model. imantha-das commented Jul 15, 2024 I am getting the same error where I am using a pretrained model. In my case your I am finetuning it, so ...