當前位置: 首頁>>代碼示例>>Python>>正文


Python make_layers.make_fc方法代碼示例

本文整理匯總了Python中maskrcnn_benchmark.modeling.make_layers.make_fc方法的典型用法代碼示例。如果您正苦於以下問題:Python make_layers.make_fc方法的具體用法?Python make_layers.make_fc怎麽用?Python make_layers.make_fc使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在maskrcnn_benchmark.modeling.make_layers的用法示例。


在下文中一共展示了make_layers.make_fc方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from maskrcnn_benchmark.modeling import make_layers [as 別名]
# 或者: from maskrcnn_benchmark.modeling.make_layers import make_fc [as 別名]
def __init__(self, cfg, in_channels):
        super(FPN2MLPFeatureExtractor, self).__init__()

        resolution = cfg.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION
        scales = cfg.MODEL.ROI_BOX_HEAD.POOLER_SCALES
        sampling_ratio = cfg.MODEL.ROI_BOX_HEAD.POOLER_SAMPLING_RATIO
        pooler = Pooler(
            output_size=(resolution, resolution),
            scales=scales,
            sampling_ratio=sampling_ratio,
        )
        input_size = in_channels * resolution ** 2
        representation_size = cfg.MODEL.ROI_BOX_HEAD.MLP_HEAD_DIM
        use_gn = cfg.MODEL.ROI_BOX_HEAD.USE_GN
        self.pooler = pooler
        self.fc6 = make_fc(input_size, representation_size, use_gn)
        self.fc7 = make_fc(representation_size, representation_size, use_gn)
        self.out_channels = representation_size 
開發者ID:Res2Net,項目名稱:Res2Net-maskrcnn,代碼行數:20,代碼來源:roi_box_feature_extractors.py

示例2: __init__

# 需要導入模塊: from maskrcnn_benchmark.modeling import make_layers [as 別名]
# 或者: from maskrcnn_benchmark.modeling.make_layers import make_fc [as 別名]
def __init__(self, cfg):
        super(FPN2MLPFeatureExtractor, self).__init__()

        resolution = cfg.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION
        scales = cfg.MODEL.ROI_BOX_HEAD.POOLER_SCALES
        sampling_ratio = cfg.MODEL.ROI_BOX_HEAD.POOLER_SAMPLING_RATIO
        pooler = PyramidRROIAlign(
            output_size=(resolution, resolution),
            scales=scales,
        )
        input_size = cfg.MODEL.BACKBONE.OUT_CHANNELS * resolution ** 2
        representation_size = cfg.MODEL.ROI_BOX_HEAD.MLP_HEAD_DIM
        use_gn = cfg.MODEL.ROI_BOX_HEAD.USE_GN
        self.pooler = pooler
        self.fc6 = make_fc(input_size, representation_size, use_gn)
        self.fc7 = make_fc(representation_size, representation_size, use_gn) 
開發者ID:clw5180,項目名稱:remote_sensing_object_detection_2019,代碼行數:18,代碼來源:roi_box_feature_extractors.py

示例3: __init__

# 需要導入模塊: from maskrcnn_benchmark.modeling import make_layers [as 別名]
# 或者: from maskrcnn_benchmark.modeling.make_layers import make_fc [as 別名]
def __init__(self, cfg):
        super(FPN2MLPFeatureExtractor, self).__init__()

        resolution = cfg.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION
        scales = cfg.MODEL.ROI_BOX_HEAD.POOLER_SCALES
        sampling_ratio = cfg.MODEL.ROI_BOX_HEAD.POOLER_SAMPLING_RATIO
        pooler = Pooler(
            output_size=(resolution, resolution),
            scales=scales,
            sampling_ratio=sampling_ratio,
        )
        input_size = cfg.MODEL.BACKBONE.OUT_CHANNELS * resolution ** 2
        representation_size = cfg.MODEL.ROI_BOX_HEAD.MLP_HEAD_DIM
        use_gn = cfg.MODEL.ROI_BOX_HEAD.USE_GN
        self.pooler = pooler
        self.fc6 = make_fc(input_size, representation_size, use_gn)
        self.fc7 = make_fc(representation_size, representation_size, use_gn) 
開發者ID:clw5180,項目名稱:remote_sensing_object_detection_2019,代碼行數:19,代碼來源:roi_box_feature_extractors.py

示例4: __init__

# 需要導入模塊: from maskrcnn_benchmark.modeling import make_layers [as 別名]
# 或者: from maskrcnn_benchmark.modeling.make_layers import make_fc [as 別名]
def __init__(self, cfg, in_channels):
        super(FPN2MLPFeatureExtractor, self).__init__()

        resolution = cfg.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION
        scales = cfg.MODEL.ROI_BOX_HEAD.POOLER_SCALES
        sampling_ratio = cfg.MODEL.ROI_BOX_HEAD.POOLER_SAMPLING_RATIO
        # ##################### changed by hui #################################
        level_map = cfg.MODEL.ROI_BOX_HEAD.POOLER_LEVEL_MAP
        level_map_kwargs = cfg.MODEL.ROI_BOX_HEAD.POOLER_LEVEL_MAP_KWARGS
        pooler = Pooler(
            output_size=(resolution, resolution),
            scales=scales,
            sampling_ratio=sampling_ratio,
            level_map=level_map,
            level_map_kwargs=level_map_kwargs
        )
        # ########################################################################
        input_size = in_channels * resolution ** 2
        representation_size = cfg.MODEL.ROI_BOX_HEAD.MLP_HEAD_DIM
        use_gn = cfg.MODEL.ROI_BOX_HEAD.USE_GN
        self.pooler = pooler
        self.fc6 = make_fc(input_size, representation_size, use_gn)
        self.fc7 = make_fc(representation_size, representation_size, use_gn)
        self.out_channels = representation_size 
開發者ID:ucas-vg,項目名稱:TinyBenchmark,代碼行數:26,代碼來源:roi_box_feature_extractors.py


注:本文中的maskrcnn_benchmark.modeling.make_layers.make_fc方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。