Could you explain why we are doing this line:
modelB.load_state_dict(modelA.state_dict())
If I do
seed=42
torch.manual_seed(seed)
resnetA = models.resnet18(pretrained=False)
resnetB = models.resnet18(pretrained=False)
x = torch.randn((1, 3, 224, 224))
print((resnetA(x) - resnetB(x)).abs().max())

I obtain different results. I’m assuming this is expected but I guess why they are different is not clear to me