Here’s what I normally do:
    model = models.inception_v3(pretrained=True)
    num_ftrs = model.fc.in_features
    model.fc = nn.Sequential(
      nn.Dropout(0.5),
      nn.Linear(num_ftrs, 5))

However this does not work at all with the squeezenet, it does not have an in_features