    def __init__(self,
                 in_channels=[256, 512, 1024],
                 norm_type='bn',
                 freeze_norm=False,
                 data_format='NCHW'):
        """
        YOLOv3FPN layer
        Args:
            in_channels (list): input channels for fpn
            norm_type (str): batch norm type, default bn
            data_format (str): data format, NCHW or NHWC
        """
        super(YOLOv3FPN, self).__init__()
        assert len(in_channels) > 0, "in_channels length should > 0"
        self.in_channels = in_channels
        self.num_blocks = len(in_channels)

        self._out_channels = []
        # self.yolo_blocks = []
        self.yolo_blocks = nn.ModuleDict()
        self.yolo_blocks_names = []
        # self.routes = []
        self.routes = nn.ModuleDict()
        self.routes_names = []
        self.data_format = data_format
        for i in range(self.num_blocks):
            name = 'yolo_block_{}'.format(i)
            in_channel = in_channels[-i - 1]
            if i > 0:
                in_channel += 512 // (2**i)
            # yolo_block = self.add_sublayer(
            #     name,
            #     YoloDetBlock(
            #         in_channel,
            #         channel=512 // (2**i),
            #         norm_type=norm_type,
            #         freeze_norm=freeze_norm,
            #         data_format=data_format,
            #         name=name))
            # self.yolo_blocks.append(yolo_block)

            yolo_block = YoloDetBlock(
                    in_channel,
                    channel=512 // (2**i),
                    norm_type=norm_type,
                    freeze_norm=freeze_norm,
                    data_format=data_format,
                    name=name)
            self.yolo_blocks.add_module(name, yolo_block)
            self.yolo_blocks_names.append(name)

            # tip layer output channel doubled
            self._out_channels.append(1024 // (2**i))

            if i < self.num_blocks - 1:
                name = 'yolo_transition_{}'.format(i)
                # route = self.add_sublayer(
                #     name,
                #     ConvBNLayer(
                #         ch_in=512 // (2**i),
                #         ch_out=256 // (2**i),
                #         filter_size=1,
                #         stride=1,
                #         padding=0,
                #         norm_type=norm_type,
                #         freeze_norm=freeze_norm,
                #         data_format=data_format,
                #         name=name))
                # self.routes.append(route)

                route = ConvBNLayer(
                        ch_in=512 // (2**i),
                        ch_out=256 // (2**i),
                        filter_size=1,
                        stride=1,
                        padding=0,
                        norm_type=norm_type,
                        freeze_norm=freeze_norm,
                        data_format=data_format,
                        name=name)
                self.routes.add_module(name, route)
                self.routes_names.append(name)
YOLOv3FPN layer
Args:
in_channels (list): input channels for fpn
norm_type (str): batch norm type, default bn
data_format (str): data format, NCHW or NHWC
ptstructure/layout/ptppyolov2/ppyolov2_yolo_fpn.py