diff --git a/pretrainedmodels/models/torchvision_models.py b/pretrainedmodels/models/torchvision_models.py index f9347161..76cd9321 100644 --- a/pretrainedmodels/models/torchvision_models.py +++ b/pretrainedmodels/models/torchvision_models.py @@ -314,7 +314,7 @@ def forward(self, input): def modify_resnets(model): # Modify attributs model.last_linear = model.fc - model.fc = None + del model.fc def features(self, input): x = self.conv1(input)