(self, features, proposals, targets=None)
return x, proposals, dict(loss_ke=loss_ke), dict(loss_mty=loss_mty)
Arguments:
            features (list[Tensor]): feature-maps from possibly several levels
            proposals (list[BoxList]): proposal boxes
            targets (list[BoxList], optional): the ground-truth targets.

        Returns:
            x (Tensor): the result of the feature extractor
            proposals (list[BoxList]): during training, the original proposals
                are returned. During testing, the predicted boxlists are returned
                with the `mask` field set
            losses (dict[Tensor]): During training, returns the losses for the
                head. During testing, returns an empty dict.
Arguments:
            features (list[Tensor]): feature-maps from possibly several levels
            proposals (list[BoxList]): proposal boxes
            targets (list[BoxList], optional): the ground-truth targets.
Arguments : features ( list [ Tensor ] ) : feature - maps from possibly several levels proposals ( list [ BoxList ] ) : proposal boxes targets ( list [ BoxList ] optional ) : the ground - truth targets .
def forward(self, features, proposals, targets=None):
        """
        Arguments:
            features (list[Tensor]): feature-maps from possibly several levels
            proposals (list[BoxList]): proposal boxes
            targets (list[BoxList], optional): the ground-truth targets.

        Returns:
            x (Tensor): the result of the feature extractor
            proposals (list[BoxList]): during training, the original proposals
                are returned. During testing, the predicted boxlists are returned
                with the `mask` field set
            losses (dict[Tensor]): During training, returns the losses for the
                head. During testing, returns an empty dict.
        """

        if self.training:
            # during training, only focus on positive boxes
            with torch.no_grad():
                proposals = self.loss_evaluator.subsample(proposals, targets)

        x = self.feature_extractor(features, proposals)
        ke_outputs_x, ke_outputs_y, mty = self.predictor(x)

        if not self.training:
            result = self.post_processor(ke_outputs_x, ke_outputs_y, mty, proposals)
            return x, result, {}, {}

        loss_ke, loss_mty = self.loss_evaluator(proposals, ke_outputs_x, ke_outputs_y, mty)

        return x, proposals, dict(loss_ke=loss_ke), dict(loss_mty=loss_mty)
def forward ( self , features , proposals , targets = None ) : if self . training : # during training, only focus on positive boxes with torch . no_grad ( ) : proposals = self . loss_evaluator . subsample ( proposals , targets ) x = self . feature_extractor ( features , proposals ) ke_outputs_x , ke_outputs_y , mty = self . predictor ( x ) if not self . training : result = self . post_processor ( ke_outputs_x , ke_outputs_y , mty , proposals ) return x , result , { } , { } loss_ke , loss_mty = self . loss_evaluator ( proposals , ke_outputs_x , ke_outputs_y , mty ) return x , proposals , dict ( loss_ke = loss_ke ) , dict ( loss_mty = loss_mty )