(pred,
target,
weight=None,
reduction='mean',
avg_factor=None,
**kwargs)
| 84 | |
| 85 | @functools.wraps(loss_func) |
| 86 | def wrapper(pred, |
| 87 | target, |
| 88 | weight=None, |
| 89 | reduction='mean', |
| 90 | avg_factor=None, |
| 91 | **kwargs): |
| 92 | # get element-wise loss |
| 93 | loss = loss_func(pred, target, **kwargs) |
| 94 | loss = weight_reduce_loss(loss, weight, reduction, avg_factor) |
| 95 | return loss |
| 96 | |
| 97 | return wrapper |
nothing calls this directly
no test coverage detected