Thank you so much for your answer
Actually I clip gradients in each iteration. Here is the code:
        for param in model.parameters():
            param.grad.data.clamp_(-1, 1)

Can the problem be related to the input data?