Indeed I have been trying to check model weights and gradients. Since the problem seems to be at the level of the first conv2d in my model I tried attaching a backward hook to that nn.conv2d module.  I am finding that at every epoch during my training the hook is called more and more times (it’s called 18 times the first epoch and then several hundreds of times by epoch 60). Since I am updating the network at every batch I was expecting the hook to be called number-of-batches times every epoch. Is this a bug?