nn.CrossEntropyLoss expects class indices in the range [0, nb_classes-1] instead of one-hot encoded tensors, so loss = self.crit(output, labels) would raise an error.
However, I guess the posted error message is raised even before reaching this line of code, so could you check the line of code raising it and then the shapes of all used tensors in this operation?