You’re right, I made a mistake, it doesn’t affect the model’s weight as I thought. However, it does affect the training loop for reasons I’ve yet to identify. I do use model.eval() and torch.no_grad(), I do know the line of code that’s causing the problem, but I don’t know the reason why. Why exactly does a square op cause the output of the model to go to infinity after a few epochs, and why does that only happen if there exists a validation loop?