MCPcopy Create free account
hub / github.com/LujiaJin/Basis-Prediction-Networks-PyTorch / __init__

Method __init__

model.py:354–358  ·  view source on GitHub ↗
(self, gradient_L1=True)

Source from the content-addressed store, hash-verified

352 """
353
354 def __init__(self, gradient_L1=True):
355 super(LossBasic, self).__init__()
356 self.l1_loss = nn.L1Loss()
357 self.l2_loss = nn.MSELoss()
358 self.gradient = TensorGradient(gradient_L1)
359
360 def forward(self, pred, ground_truth):
361 return self.l2_loss(pred, ground_truth) + \

Callers

nothing calls this directly

Calls 2

TensorGradientClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected