I have to modify the last layer of resnet18 in pytorch where the size of labels=(2,10).
I tried to do that but I am getting errors because of labels size .How to resolve it.
My code for that:-
in_features = resnet.fc.in_features
resnet.fc = nn.Linear(in_features, labels)
Here the size of labels is creating problems as it is (2,10).?