Hi,
in cross validation i use pre-trained model, i need to reset just the weights of Fc layer (classifier layer) , Thanks
You can simply assign the last layer manually after loading it.
e.g.,
pretrained_model = [some steps that gave me the pretrained model]
pretrained_model.fc = nn.Linear(input_channels, num_classes)
should work for most pretrained models in torchvision
.