def collect_fpn_proposals(multi_rois, multi_scores, min_level, max_level, post_nms_top_n, name=None):
    "\n\t:alias_main: paddle.nn.functional.collect_fpn_proposals\n\t:alias: paddle.nn.functional.collect_fpn_proposals,paddle.nn.functional.vision.collect_fpn_proposals\n\t:old_api: paddle.fluid.layers.collect_fpn_proposals\n\t\n    **This OP only supports LoDTensor as input**. Concat multi-level RoIs \n    (Region of Interest) and select N RoIs with respect to multi_scores. \n    This operation performs the following steps:\n\n    1. Choose num_level RoIs and scores as input: num_level = max_level - min_level\n    2. Concat multi-level RoIs and scores\n    3. Sort scores and select post_nms_top_n scores\n    4. Gather RoIs by selected indices from scores\n    5. Re-sort RoIs by corresponding batch_id\n\n    Args:\n        multi_rois(list): List of RoIs to collect. Element in list is 2-D \n            LoDTensor with shape [N, 4] and data type is float32 or float64, \n            N is the number of RoIs.\n        multi_scores(list): List of scores of RoIs to collect. Element in list \n            is 2-D LoDTensor with shape [N, 1] and data type is float32 or\n            float64, N is the number of RoIs.\n        min_level(int): The lowest level of FPN layer to collect\n        max_level(int): The highest level of FPN layer to collect\n        post_nms_top_n(int): The number of selected RoIs\n        name(str, optional): For detailed information, please refer \n            to :ref:`api_guide_Name`. Usually name is no need to set and \n            None by default.        \n\n    Returns:\n        Variable:\n\n        fpn_rois(Variable): 2-D LoDTensor with shape [N, 4] and data type is \n        float32 or float64. Selected RoIs. \n\n\n    Examples:\n        .. code-block:: python\n           \n            import paddle.fluid as fluid\n            multi_rois = []\n            multi_scores = []\n            for i in range(4):\n                multi_rois.append(fluid.data(\n                    name='roi_'+str(i), shape=[None, 4], dtype='float32', lod_level=1))\n            for i in range(4):\n                multi_scores.append(fluid.data(\n                    name='score_'+str(i), shape=[None, 1], dtype='float32', lod_level=1))\n\n            fpn_rois = fluid.layers.collect_fpn_proposals(\n                multi_rois=multi_rois, \n                multi_scores=multi_scores,\n                min_level=2, \n                max_level=5, \n                post_nms_top_n=2000)\n    "
    check_type(multi_rois, 'multi_rois', list, 'collect_fpn_proposals')
    check_type(multi_scores, 'multi_scores', list, 'collect_fpn_proposals')
    helper = LayerHelper('collect_fpn_proposals', **locals())
    dtype = helper.input_dtype('multi_rois')
    check_dtype(dtype, 'multi_rois', ['float32', 'float64'], 'collect_fpn_proposals')
    num_lvl = ((max_level - min_level) + 1)
    input_rois = multi_rois[:num_lvl]
    input_scores = multi_scores[:num_lvl]
    output_rois = helper.create_variable_for_type_inference(dtype)
    output_rois.stop_gradient = True
    helper.append_op(type='collect_fpn_proposals', inputs={'MultiLevelRois': input_rois, 'MultiLevelScores': input_scores}, outputs={'FpnRois': output_rois}, attrs={'post_nms_topN': post_nms_top_n})
    return output_rois
:alias_main: paddle.nn.functional.collect_fpn_proposals
    :alias: paddle.nn.functional.collect_fpn_proposals,paddle.nn.functional.vision.collect_fpn_proposals
    :old_api: paddle.fluid.layers.collect_fpn_proposals
    
**This OP only supports LoDTensor as input**. Concat multi-level RoIs 
(Region of Interest) and select N RoIs with respect to multi_scores. 
This operation performs the following steps:

1. Choose num_level RoIs and scores as input: num_level = max_level - min_level
2. Concat multi-level RoIs and scores
3. Sort scores and select post_nms_top_n scores
4. Gather RoIs by selected indices from scores
5. Re-sort RoIs by corresponding batch_id

Args:
    multi_rois(list): List of RoIs to collect. Element in list is 2-D 
        LoDTensor with shape [N, 4] and data type is float32 or float64, 
        N is the number of RoIs.
    multi_scores(list): List of scores of RoIs to collect. Element in list 
        is 2-D LoDTensor with shape [N, 1] and data type is float32 or
        float64, N is the number of RoIs.
    min_level(int): The lowest level of FPN layer to collect
    max_level(int): The highest level of FPN layer to collect
    post_nms_top_n(int): The number of selected RoIs
    name(str, optional): For detailed information, please refer 
        to :ref:`api_guide_Name`. Usually name is no need to set and 
        None by default.        

Returns:
    Variable:

    fpn_rois(Variable): 2-D LoDTensor with shape [N, 4] and data type is 
    float32 or float64. Selected RoIs. 


Examples:
    .. code-block:: python
       
        import paddle.fluid as fluid
        multi_rois = []
        multi_scores = []
        for i in range(4):
            multi_rois.append(fluid.data(
                name='roi_'+str(i), shape=[None, 4], dtype='float32', lod_level=1))
        for i in range(4):
            multi_scores.append(fluid.data(
                name='score_'+str(i), shape=[None, 1], dtype='float32', lod_level=1))

        fpn_rois = fluid.layers.collect_fpn_proposals(
            multi_rois=multi_rois, 
            multi_scores=multi_scores,
            min_level=2, 
            max_level=5, 
            post_nms_top_n=2000)
def collect_fpn_proposals(multi_rois, multi_scores, min_level, max_level, post_nms_top_n, name=None):
    "\n\t:alias_main: paddle.nn.functional.collect_fpn_proposals\n\t:alias: paddle.nn.functional.collect_fpn_proposals,paddle.nn.functional.vision.collect_fpn_proposals\n\t:old_api: paddle.fluid.layers.collect_fpn_proposals\n\t\n    **This OP only supports LoDTensor as input**. Concat multi-level RoIs \n    (Region of Interest) and select N RoIs with respect to multi_scores. \n    This operation performs the following steps:\n\n    1. Choose num_level RoIs and scores as input: num_level = max_level - min_level\n    2. Concat multi-level RoIs and scores\n    3. Sort scores and select post_nms_top_n scores\n    4. Gather RoIs by selected indices from scores\n    5. Re-sort RoIs by corresponding batch_id\n\n    Args:\n        multi_rois(list): List of RoIs to collect. Element in list is 2-D \n            LoDTensor with shape [N, 4] and data type is float32 or float64, \n            N is the number of RoIs.\n        multi_scores(list): List of scores of RoIs to collect. Element in list \n            is 2-D LoDTensor with shape [N, 1] and data type is float32 or\n            float64, N is the number of RoIs.\n        min_level(int): The lowest level of FPN layer to collect\n        max_level(int): The highest level of FPN layer to collect\n        post_nms_top_n(int): The number of selected RoIs\n        name(str, optional): For detailed information, please refer \n            to :ref:`api_guide_Name`. Usually name is no need to set and \n            None by default.        \n\n    Returns:\n        Variable:\n\n        fpn_rois(Variable): 2-D LoDTensor with shape [N, 4] and data type is \n        float32 or float64. Selected RoIs. \n\n\n    Examples:\n        .. code-block:: python\n           \n            import paddle.fluid as fluid\n            multi_rois = []\n            multi_scores = []\n            for i in range(4):\n                multi_rois.append(fluid.data(\n                    name='roi_'+str(i), shape=[None, 4], dtype='float32', lod_level=1))\n            for i in range(4):\n                multi_scores.append(fluid.data(\n                    name='score_'+str(i), shape=[None, 1], dtype='float32', lod_level=1))\n\n            fpn_rois = fluid.layers.collect_fpn_proposals(\n                multi_rois=multi_rois, \n                multi_scores=multi_scores,\n                min_level=2, \n                max_level=5, \n                post_nms_top_n=2000)\n    "
    check_type(multi_rois, 'multi_rois', list, 'collect_fpn_proposals')
    check_type(multi_scores, 'multi_scores', list, 'collect_fpn_proposals')
    helper = LayerHelper('collect_fpn_proposals', **locals())
    dtype = helper.input_dtype('multi_rois')
    check_dtype(dtype, 'multi_rois', ['float32', 'float64'], 'collect_fpn_proposals')
    num_lvl = ((max_level - min_level) + 1)
    input_rois = multi_rois[:num_lvl]
    input_scores = multi_scores[:num_lvl]
    output_rois = helper.create_variable_for_type_inference(dtype)
    output_rois.stop_gradient = True
    helper.append_op(type='collect_fpn_proposals', inputs={'MultiLevelRois': input_rois, 'MultiLevelScores': input_scores}, outputs={'FpnRois': output_rois}, attrs={'post_nms_topN': post_nms_top_n})
    return output_rois