(self, cfg, in_channels, num_anchors)
Arguments:
            cfg              : config
            in_channels (int): number of channels of the input feature
            num_anchors (int): number of anchors to be predicted
Arguments:
            cfg              : config
            in_channels (int): number of channels of the input feature
            num_anchors (int): number of anchors to be predicted
Arguments : cfg : config in_channels ( int ) : number of channels of the input feature num_anchors ( int ) : number of anchors to be predicted
def __init__(self, cfg, in_channels, num_anchors):
        """
        Arguments:
            cfg              : config
            in_channels (int): number of channels of the input feature
            num_anchors (int): number of anchors to be predicted
        """
        super(RPNHeadConvRegressor, self).__init__()
        self.cls_logits = nn.Conv2d(in_channels, num_anchors, kernel_size=1, stride=1)
        self.bbox_pred = nn.Conv2d(
            in_channels, num_anchors * 4, kernel_size=1, stride=1
        )

        for l in [self.cls_logits, self.bbox_pred]:
            torch.nn.init.normal_(l.weight, std=0.01)
            torch.nn.init.constant_(l.bias, 0)
def __init__ ( self , cfg , in_channels , num_anchors ) : super ( RPNHeadConvRegressor , self ) . __init__ ( ) self . cls_logits = nn . Conv2d ( in_channels , num_anchors , kernel_size = 1 , stride = 1 ) self . bbox_pred = nn . Conv2d ( in_channels , num_anchors * 4 , kernel_size = 1 , stride = 1 ) for l in [ self . cls_logits , self . bbox_pred ] : torch . nn . init . normal_ ( l . weight , std = 0.01 ) torch . nn . init . constant_ ( l . bias , 0 )