box_embeddings.modules.regularization.regularizer
¶
Module Contents¶
- class BoxRegularizer(weight: float, log_scale: bool = True, reduction: str = 'sum', **kwargs: Any)¶
Bases:
torch.nn.Module
,box_embeddings.common.registrable.Registrable
Base box-regularizer class
- forward(self, box_tensor: box_embeddings.parameterizations.box_tensor.BoxTensor) Union[float, torch.Tensor] ¶
Calls the _forward and multiplies the weight
- Parameters
box_tensor – Input box tensor
- Returns
scalar regularization loss