I changed the syntax to be:
images = images.unsqueeze(1).type(torch.FloatTensor)
outputs = model(images)

And this seems like it solved the dimensions problem, but now I am getting a new error that says: “Expected object of backend CPU but got backend CUDA for argument #2 ‘weight’”. Do you know what that one means and how to fix?