If I understand correctly, topic author is trying to understand why his own implementation and implementation of resnet18 from torchvision give different results. First, i would try to catch some obvious mistakes like instantiating pretrained version from torchvision. Second, I would go through the source code of torchvision model and make sure I did all the layer instantiations and weights initialization in my own model the same as they do in ‘reference’ model. Without looking into ‘own’ model code it is to broad topic to discuss, right?