[docs]classRoIPooler(nn.Module):"""Base class for RoI poolers."""def__init__(self,resolution:tuple[int,int])->None:"""Creates an instance of the class."""super().__init__()self.resolution=resolution
[docs]@abc.abstractmethoddefforward(self,features:list[torch.Tensor],boxes:list[torch.Tensor])->torch.Tensor:"""Pool features in input bounding boxes from given feature maps."""raiseNotImplementedError