(self, smoothing=0.0, reduction='mean')
| 12 | Soft cross entropy loss with label smoothing. |
| 13 | """ |
| 14 | def __init__(self, smoothing=0.0, reduction='mean'): |
| 15 | super(SmoothCrossEntropyLoss, self).__init__() |
| 16 | self.smoothing = smoothing |
| 17 | self.reduction = reduction |
| 18 | |
| 19 | def forward(self, input, target): |
| 20 | num_classes = input.shape[1] |
nothing calls this directly
no outgoing calls
no test coverage detected