pytorch验算CrossEntropyLoss ,BCELoss 和 BCEWithLogitsLoss
一.手动计算、log_softmax+nll_loss、nn.CrossEntropyLoss三种方式计算交叉熵:(classtorch.nn.CrossEntropyLoss(weight=None,size_average=None,ignore_index=-100,reduce=None,reduction=‘elementwise_mean’)功能:将输入经过softmax激活函数之后,