MCPcopy Create free account
hub / github.com/HYUNJS/SGT / FocalLoss

Class FocalLoss

projects/CenterNet/centernet/losses.py:113–121  ·  view source on GitHub ↗

nn.Module warpper for focal loss

Source from the content-addressed store, hash-verified

111
112
113class FocalLoss(nn.Module):
114 """nn.Module warpper for focal loss"""
115
116 def __init__(self):
117 super(FocalLoss, self).__init__()
118 self.neg_loss = _neg_loss
119
120 def forward(self, out, target):
121 return self.neg_loss(out, target)
122
123
124class RegLoss(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected