def forward(self, featmap_size, stride=16):
    feat_h = featmap_size[0]
    feat_w = featmap_size[1]
    shift_x = (paddle.arange(0, feat_w, 1, 'int32') * stride)
    shift_y = (paddle.arange(0, feat_h, 1, 'int32') * stride)
    (shift_xx, shift_yy) = self._meshgrid(shift_x, shift_y)
    shifts = paddle.stack([shift_xx, shift_yy, shift_xx, shift_yy], axis=(- 1))
    all_anchors = (self.base_anchors[:, :] + shifts[:, :])
    all_anchors = all_anchors.reshape([(feat_h * feat_w), 4])
    return all_anchors
def forward(self, featmap_size, stride=16):
    feat_h = featmap_size[0]
    feat_w = featmap_size[1]
    shift_x = (paddle.arange(0, feat_w, 1, 'int32') * stride)
    shift_y = (paddle.arange(0, feat_h, 1, 'int32') * stride)
    (shift_xx, shift_yy) = self._meshgrid(shift_x, shift_y)
    shifts = paddle.stack([shift_xx, shift_yy, shift_xx, shift_yy], axis=(- 1))
    all_anchors = (self.base_anchors[:, :] + shifts[:, :])
    all_anchors = all_anchors.reshape([(feat_h * feat_w), 4])
    return all_anchors