Hello Aptha!



 Aptha_Gowda:

My question is how come
model.eval()
with torch.no_grad():

is affecting my training as these lines turn off everything?


Well, any number of things that could affect your training could be hiding
in the code you allude to.
One possibility is that if both your training and validation code consume
pseudo-random numbers, turning off your training could cause different
pseudo-random numbers to be fed to your training, affecting the training
results.
For example, if both your training and validation involve using a random
DataLoader, you could see this kind of issue.
Best.
K. Frank