This should work:
model.classifier[6] = nn.Linear(in_features=4096, out_features=2, bias=True)
model.classifier = nn.Sequential(*list(model.classifier) + [nn.Softmax(1)])

Note however, that you cannot pass the output to nn.CrossEntropyLoss.
You could apply torch.log on it and pass it to nn.NLLLoss, which might be numerically unstable compared to F.log_softmax.