(self, hs)
return locs, confs
Calculates RoIs.

        Args:
            hs (iterable of array): An iterable of feature maps.

        Returns:
            tuple of two arrays:
            :obj:`locs` and :obj:`confs`.

            * **locs**: A list of arrays whose shape is \
                :math:`(N, K_l, 4)`, where :math:`N` is the size of batch and \
                :math:`K_l` is the number of the anchor boxes \
                of the :math:`l`-th level.
            " **confs**: A list of array whose shape is :math:`(N, K_l)`.
Calculates RoIs.
Calculates RoIs .
def forward(self, hs):
        """Calculates RoIs.

        Args:
            hs (iterable of array): An iterable of feature maps.

        Returns:
            tuple of two arrays:
            :obj:`locs` and :obj:`confs`.

            * **locs**: A list of arrays whose shape is \
                :math:`(N, K_l, 4)`, where :math:`N` is the size of batch and \
                :math:`K_l` is the number of the anchor boxes \
                of the :math:`l`-th level.
            " **confs**: A list of array whose shape is :math:`(N, K_l)`.
        """

        locs = []
        confs = []
        for h in hs:
            h = F.relu(self.conv(h))

            loc = self.loc(h)
            loc = F.transpose(loc, (0, 2, 3, 1))
            loc = F.reshape(loc, (loc.shape[0], -1, 4))
            locs.append(loc)

            conf = self.conf(h)
            conf = F.transpose(conf, (0, 2, 3, 1))
            conf = F.reshape(conf, (conf.shape[0], -1))
            confs.append(conf)

        return locs, confs
def forward ( self , hs ) : locs = [ ] confs = [ ] for h in hs : h = F . relu ( self . conv ( h ) ) loc = self . loc ( h ) loc = F . transpose ( loc , ( 0 , 2 , 3 , 1 ) ) loc = F . reshape ( loc , ( loc . shape [ 0 ] , - 1 , 4 ) ) locs . append ( loc ) conf = self . conf ( h ) conf = F . transpose ( conf , ( 0 , 2 , 3 , 1 ) ) conf = F . reshape ( conf , ( conf . shape [ 0 ] , - 1 ) ) confs . append ( conf ) return locs , confs