MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / __init__

Method __init__

detrsmpl/models/losses/iou_loss.py:253–270  ·  view source on GitHub ↗
(self,
                 linear=False,
                 eps=1e-6,
                 reduction='mean',
                 loss_weight=1.0,
                 mode='log')

Source from the content-addressed store, hash-verified

251 Default: 'log'
252 """
253 def __init__(self,
254 linear=False,
255 eps=1e-6,
256 reduction='mean',
257 loss_weight=1.0,
258 mode='log'):
259 super(IoULoss, self).__init__()
260 assert mode in ['linear', 'square', 'log']
261 if linear:
262 mode = 'linear'
263 warnings.warn('DeprecationWarning: Setting "linear=True" in '
264 'IOULoss is deprecated, please use "mode=`linear`" '
265 'instead.')
266 self.mode = mode
267 self.linear = linear
268 self.eps = eps
269 self.reduction = reduction
270 self.loss_weight = loss_weight
271
272 def forward(self,
273 pred,

Callers 4

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected