I have changed the last layer to resnet18.fc = torch.nn.Linear(512, 102, bias=True), but with MSELoss I still receiving this error, but now do not match: input [1 x 102]. I have tested NLLLoss and it works, but I don’t want to use NNLLoss. Some tips ? (I think I’m updating all fc, right ?!)