You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
model_name = 'inceptionresnetv2' # could be fbresnet152 or inceptionresnetv2
model = pretrainedmodels.__dict__[model_name](num_classes=1001, pretrained=None)
model_to_load = torch.load(root + "model_file/inceptionresnetv2-520b38e4.pth") # 注意修改
model.load_state_dict(model_to_load, strict=True)
model.last_linear = nn.Linear(1536, 6 * 101)
it is the previous codes, it can run well. but when i replace them with
model_name = 'Alexnet' # could be fbresnet152 or inceptionresnetv2
model = models.alexnet(pretrained=True)
num_fc = model.classifier[6].in_features
model.classifier[6] = torch.nn.Linear(in_features=num_fc, out_features=606)
please tell me some possible reason, thanks a lot
The text was updated successfully, but these errors were encountered: