In a fairly large model, I have a few linear layers which I was not using, so I commented them out and surprisingly my Average Precision for first epoch moves from 34 to 33. My seeds are fixed so I know what to expect in epoch if I remove the comments then it will again predict Average Precision Score as 34.
Is there any reason for that. I have added a toy example below:
First Example:
class test(nn.Module):
    def __init__(self):
      super(test,self).__init__()
      self.lin_unused=nn.Sequential(nn.Linear(1024, 1024),nn.ReLU(),)
      self.lin_used=nn.Sequential(nn.Linear(1024, 512),nn.ReLU(),)
    def  forward(input):
      output=self.lin_used(input)
Second Example:
class test(nn.Module):
    def __init__(self):
      super(test,self).__init__()
      #self.lin_unused=nn.Sequential(nn.Linear(1024, 1024),nn.ReLU(),)
      self.lin_used=nn.Sequential(nn.Linear(1024, 512),nn.ReLU(),)
    def  forward(input):
      output=self.lin_used(input)         


AP for First Example : 34,
AP for Second example:33