box_embeddings.modules.pooling.bag_of_boxes
¶
Module Contents¶
- bag_of_boxes_pooler(boxes: box_embeddings.parameterizations.box_tensor.BoxTensor, mask: Optional[torch.BoolTensor] = None, weights: Optional[torch.Tensor] = None, dim: int = 0, keepdim: bool = False) box_embeddings.parameterizations.box_tensor.BoxTensor ¶
- class BagOfBoxesBoxPooler(dim: int = 0, keepdim: bool = False)¶
Bases:
box_embeddings.modules.pooling.pooling.BoxPooler
Pools a box tensor using hard intersection operation
- forward(self, box_tensor: box_embeddings.parameterizations.box_tensor.BoxTensor, mask: torch.BoolTensor = None, weights: torch.BoolTensor = None) box_embeddings.parameterizations.box_tensor.BoxTensor ¶
- Parameters
box_tensor – Input
mask – With shape as box_tensor.box_shape[:-1]. 0 at a position means mask it.
weights – With shape as box_tensor.box_shape[:-1].
- Returns
Pooled output
- Return type