CrossEntropyLoss¶ class mmocr.models.common.CrossEntropyLoss(weight=None, size_average=None, ignore_index=- 100, reduce=None, reduction='mean', label_smoothing=0.0)[源代码]¶ Cross entropy loss. 参数 weight (Optional[torch.Tensor]) – ignore_index (int) – reduction (str) – label_smoothing (float) – 返回类型 None