MCPcopy Create free account
hub / github.com/SLDGroup/EMCAD / __init__

Method __init__

utils/misc.py:42–44  ·  view source on GitHub ↗
(self, weight=None, size_average=True, ignore_index=255)

Source from the content-addressed store, hash-verified

40
41class CrossEntropyLoss2d(nn.Module):
42 def __init__(self, weight=None, size_average=True, ignore_index=255):
43 super(CrossEntropyLoss2d, self).__init__()
44 self.nll_loss = nn.NLLLoss2d(weight, size_average, ignore_index)
45
46 def forward(self, inputs, targets):
47 return self.nll_loss(F.log_softmax(inputs), targets)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected