MCPcopy Create free account
hub / github.com/imrahulr/hat / __init__

Method __init__

core/utils/utils.py:14–17  ·  view source on GitHub ↗
(self, smoothing=0.0, reduction='mean')

Source from the content-addressed store, hash-verified

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]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected