Hi,
I am trying to use pretrained Resnet50 for regression task
I changed the output of the fc to 1
model = torchvision.models.resnet50(pretrained=True)
model.fc.out_features = 1
and I am using the MSELoss  as loss function and my batch_size = 15
criterion = nn.MSELoss()
preds = network(images)
loss = criterion(preds, labels)
I am getting the following error:
return torch._C._VariableFunctions.broadcast_tensors(tensors)

RuntimeError: The size of tensor a (15000) must match the size of tensor b (15) at non-singleton dimension 0