I’m not sure what code snippet you are looking for.



 _joker:

As I have a pre-trained resnet for CIFAR10 and I am using that to load for training with the same resnet18 definition as torchvision.models.resnet18 . My model doesn’t learn anything and has only 10% accuracy.


I would generally recommend to try to overfit a small data sample as a quick test to check for potential bugs in the code.



 _joker:

But when I print the model, all the biases=False except for the last fc layer.


This is expected, as all bias parameters in the conv layers are deactivated, since they are followed by batchnorm layers and thus scaled.



 _joker:

Now when I try training the whole pre-trained model over my new data which is adversary of CIFAR10, it gives me 76% test accuracy but the original accuracy on CIFAR10 decreases from 93.33% to 87%


How was the original accuracy on CIFAR10 calculated, if you can only achieve 10%?