loss = F.cross_entropy(output, labels)
output: the output of the fully connected layer of the network, the value may be positive or negative. For example [1.56, -2.43], etc. labels
: normal labels, for example, a total of 5 categories, the value is 0-4