Pytorch中的损失函数-CROSSENTROPY LOSS
CLASS torch.nn.CrossEntropyLoss(weight=None, size_average=None, ignore_index=-100, reduce=None, reduction='mean', label_smoothing=0.0)
weight (Tensor, optional) 每个类别的权重,如果指定,维度大小为 C (类别数)
ignore_index (int, optional) 不计入损失函数的类别索引
reduction (string, opti
原创
2022-03-11 15:41:01 ·
3613 阅读 ·
0 评论