I am using pre-trained resnet for fine-tuning it to adversarial examples in this way;
model_ft = models.resnet18(pretrained=True)
num_ftrs = model_ft.fc.in_features
model_ft.fc = nn.Linear(num_ftrs, NUM_CLASSES)

model_ft = train_model(model_ft, criterion, optimizer_ft, exp_lr_scheduler, num_epochs=100)
model_ft.save_state_dict('fine_tuned_best_model.pt')


My confusion is, when I load my model fine_tuned_best_model.pt back for testing, should I just give the resnet18 definition like this;
classifier = resnet18()
model_para = torch.load(CLASSIFIER_PATH)
classifier.load_state_dict(model_para['net'])
classifier = nn.DataParallel(classifier) if torch.cuda.device_count() > 1 else classifier
classifier.to(device)

or do I need that last layer which I added for training?