bing:

n_inputs = model_transfer1._fc.in_features
model_transfer1._fc = nn.Linear(n_inputs, 3)



Thanks, I have to do the step twice, first to remove the 1000 labels(ImageNet dataset) to 2(My trained network) and then to 3 (my desired finetuning network).