“Out of Memory” error when restarting the training after validation

“Out of Memory” error when restarting the training after validation. And validation is OK.

Did you use with torch.no_grad() for your validation?
If so, could you post a simplified code snippet representing your training and validation routine?