MCPcopy Create free account
hub / github.com/ActiveVisionLab/DFNet / __init__

Method __init__

script/models/losses.py:6–9  ·  view source on GitHub ↗
(self, coef=1)

Source from the content-addressed store, hash-verified

4
5class ColorLoss(nn.Module):
6 def __init__(self, coef=1):
7 super().__init__()
8 self.coef = coef
9 self.loss = nn.MSELoss(reduction='mean')
10
11 def forward(self, inputs, targets):
12 loss = self.loss(inputs['rgb_coarse'], targets)

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected