MCPcopy Create free account
hub / github.com/Tencent/NeuralNLP-NeuralClassifier / LossType

Class LossType

model/loss.py:21–34  ·  view source on GitHub ↗

Standard names for loss type

Source from the content-addressed store, hash-verified

19
20
21class LossType(Type):
22 """Standard names for loss type
23 """
24 SOFTMAX_CROSS_ENTROPY = "SoftmaxCrossEntropy"
25 SOFTMAX_FOCAL_CROSS_ENTROPY = "SoftmaxFocalCrossEntropy"
26 SIGMOID_FOCAL_CROSS_ENTROPY = "SigmoidFocalCrossEntropy"
27 BCE_WITH_LOGITS = "BCEWithLogitsLoss"
28
29 @classmethod
30 def str(cls):
31 return ",".join([cls.SOFTMAX_CROSS_ENTROPY,
32 cls.SOFTMAX_FOCAL_CROSS_ENTROPY,
33 cls.SIGMOID_FOCAL_CROSS_ENTROPY,
34 cls.BCE_WITH_LOGITS])
35
36
37class ActivationType(Type):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected