Thankyou for pointing out this possibility.
So you mean to say that, Adam optimizer which I am using by default has weight decay (L2 penalty on weights tensor )switched on which thus penalises the weights of the sub-module which does not contribute to the output.
But if this is the case i am simply using,
torch.optim. Adam ( model.parameters , lr=0.0001 )
And by default i think Adam has weight decay set to 0.
Thankyou