I did that as well but the nans that I get are on the loss. I think that something is going wrong with the data… Otherwise I dont know what could possibly be going wrong. Do you have any other suggestions ?