sougata_saha:

Since the scale of gradients in the cross entropy loss is going to be different from the scale of gradients from the MSE Loss, is it going to affect the training of the model, and if this is the correct way to train the model.


You could use .register_hook on the model.gru parameters and check the gradient magnitude.
Both losses will accumulate the gradients in this layer, so you might need to reduce the learning rate for these parameters.