import numpy as np
import megengine.functional as F
import megengine.module as M
from config import config
from .anchors_generator import AnchorGenerator
from .find_top_rpn_proposals import find_top_rpn_proposals
from .fpn_anchor_target import fpn_anchor_target, fpn_rpn_reshape
from det_opr.loss_opr import softmax_loss, smooth_l1_loss_rpn
import pdb
class RPN(M.Module):
    def __init__(self, rpn_channel=256):
        
        super().__init__()
        self.anchors_generator = AnchorGenerator(
            config.anchor_base_size,
            config.anchor_aspect_ratios,
            config.anchor_base_scale)
        self.rpn_conv = M.Conv2d(256, rpn_channel, kernel_size=3, stride=1, padding=1)
        self.rpn_cls_score = 
M.Conv2d(rpn_channel, config.num_cell_anchors * 2, kernel_size=1, stride=1)