@ptrblck Yeah sure I will do that. I had checked that and found that loss was fine. If I remove  val_metrics(model, valid_dl) call in training loop, there is no leakage. However, if I include it, I face issues. I will try to run what you have suggested. I can share the model and optimizer in some time if it still doesn’t work.
I was previously using a different version of pytorch on production system hence the variable. Will drop it