Hi, thanks Simone. I am actually finding that the magnitudes of the losses are quite high in comparison with other models I have trained (now I have losses in the order of 10, instead of orders of 0.1 in the first moments of training). I have however tried renormalizing the loss function by dividing its value by manitudes as large as 1e6, and the NaNs keep appearing.