Remove the squeeze() operation on the output tensor, as it’ll remove the class dimension.
Also note that nn.CrossEntropyLoss is used for a multi-class classification, so returning the logic for a single class will only predict this class alone.