MCPcopy Create free account
hub / github.com/DIVE128/DMVSNet / regression_loss

Function regression_loss

loss.py:156–159  ·  view source on GitHub ↗
(depth_est, depth_gt, mask, weight)

Source from the content-addressed store, hash-verified

154
155 return loss
156def regression_loss(depth_est, depth_gt, mask, weight):
157 loss = F.smooth_l1_loss(depth_est[mask], depth_gt[mask], reduction='none')
158 loss = (loss* weight[mask]).mean()
159 return loss
160
161def binary_cross_entropy_with_logits(input, target, weight=None, size_average=None,
162 reduce=False, reduction='elementwise_mean', pos_weight=None,mask=None):

Callers 1

mvs_lossFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected