If I stop and then resume the training everything works fine. I have used PyTorch anomaly detection and even tried to clip gradient between -5 to 5 but it’s also not working. but the problem is  what can be the issue then

Data does not contain any nan value.
Changing the model does not work.
Gradient clipping does not work.
learning rate is 1e^-3 at the start of training and updating it using lr scheduler
Apparently there is no issue in metric and loss calculation code.

then what can be the issue
kindly guide me
Any help will be appreciated
Thanks