MCPcopy Create free account
hub / github.com/DragonisCV/RAM / wrapper

Function wrapper

ram/losses/loss_util.py:90–94  ·  view source on GitHub ↗
(pred, target, weight=None, reduction='mean', **kwargs)

Source from the content-addressed store, hash-verified

88
89 @functools.wraps(loss_func)
90 def wrapper(pred, target, weight=None, reduction='mean', **kwargs):
91 # get element-wise loss
92 loss = loss_func(pred, target, **kwargs)
93 loss = weight_reduce_loss(loss, weight, reduction)
94 return loss
95
96 return wrapper

Callers

nothing calls this directly

Calls 1

weight_reduce_lossFunction · 0.85

Tested by

no test coverage detected