[pytorch] about cross_entropy function

 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

Guess you like

Origin blog.csdn.net/condom10010/article/details/129486606