What is the reason for some nan value when training

image
As figure shows, I get some nan loss value on triangle position, what is the reason?

There could be many reasons, unnormalized data is one of them.

Please note that without seeing the code, it becomes very hard to answer question like these.

As mentioned by @Ehsan1997, it is difficult to identify without looking at code. However, here is a similar thread which might be helpful https://discuss.pytorch.org/t/nan-loss-coming-after-some-time/11568/31