I am using only a part of a pretrained net. If I keep the unused parameters, then I am getting the following results:
Output of method 1:
Epoch:  0  Iteration:  0  Loss:  tensor(18.7229, device=‘cuda:0’)
However, if I get rid of the unused parameters, then I am getting the following results:
Output of method 2:
Epoch:  0  Iteration:  0  Loss:  tensor(30.2404, device=‘cuda:0’)
Why would the unused parameters affect the outcome of the forward pass?