There are very large intermediate values computed in my loss function, I wonder if these are leading to gradient explosion… I want to try using batchnorm layers to see if I can mitigate this, but I’m not sure how to use the nn.functional.batch_norm. How do I make sure running_mean, running_var, args are being updated during training / being frozen during evaluation?