def METHOD_NAME():
    main_program = paddle.static.Program()
    startup_program = paddle.static.Program()
    with paddle.static.program_guard(main_program, startup_program):
        scores = fluid.layers.data(
            name='scores',
            shape=[-1, 4, 16, 16],
            append_batch_size=False,
            dtype='float32')
        bbox_deltas = fluid.layers.data(
            name='bbox_deltas',
            shape=[-1, 16, 16, 16],
            append_batch_size=False,
            dtype='float32')
        im_info = fluid.layers.data(
            name='im_info',
            shape=[-1, 3],
            append_batch_size=False,
            dtype='float32')
        anchors = fluid.layers.data(
            name='anchors',
            shape=[16, 16, 4, 4],
            append_batch_size=False,
            dtype='float32')
        variances = fluid.layers.data(
            name='variances',
            shape=[16, 16, 4, 4],
            append_batch_size=False,
            dtype='float32')
        def init_test_input():
            batch_size = 1
            input_channels = 20
            layer_h = 16
            layer_w = 16
            input_feat = np.random.random((batch_size, input_channels, layer_h,
                                           layer_w)).astype('float32')
            # from test_anchor_generator_op import anchor_generator_in_python
            anchors, variances = anchor_generator_in_python(
                input_feat=input_feat,
                anchor_sizes=[16., 32.],
                aspect_ratios=[0.5, 1.0],
                variances=[1.0, 1.0, 1.0, 1.0],
                stride=[16.0, 16.0],
                offset=0.5)
            im_shape = np.array([[64, 64]]).astype('float32')
            num_anchors = anchors.shape[2]
            scores = np.random.random(
                (batch_size, num_anchors, layer_h, layer_w)).astype('float32')
            bbox_deltas = np.random.random((batch_size, num_anchors * 4,
                                            layer_h, layer_w)).astype('float32')
            im_info = np.array([[64., 64., 4]]).astype(
                'float32')  # im_height, im_width, scale
            return scores, bbox_deltas, im_shape, im_info, anchors, variances
        scores_data, bbox_deltas_data, im_shape_data, im_info_data, anchors_data, variances_data = init_test_input(
        )
        pre_nms_topN = 12000
        post_nms_topN = 5000
        nms_thresh = 0.7
        min_size = 3.0
        eta = 1.
        return_rois_num = False
        out = fluid.layers.generate_proposals(
            scores,
            bbox_deltas,
            im_info,
            anchors,
            variances,
            pre_nms_top_n=pre_nms_topN,
            post_nms_top_n=post_nms_topN,
            nms_thresh=nms_thresh,
            min_size=min_size,
            eta=eta,
            return_rois_num=return_rois_num)
        exe = paddle.static.Executor(paddle.CPUPlace())
        exe.run(paddle.static.default_startup_program())
        result = exe.run(feed={
            "scores": scores_data,
            "bbox_deltas": bbox_deltas_data,
            "im_info": im_info_data,
            "anchors": anchors_data,
            "variances": variances_data
        },
                         fetch_list=[out],
                         return_numpy=False)
        path_prefix = "./generate_proposals"
        fluid.io.save_inference_model(
            path_prefix,
            ["scores", "bbox_deltas", "im_info", "anchors", "variances"], out,
            exe)
        onnx_path = path_prefix + "/model.onnx"
        program2onnx(
            model_dir=path_prefix,
            save_file=onnx_path,
            opset_version=12,
            enable_onnx_checker=True)
        sess = rt.InferenceSession(
            onnx_path, providers=['CPUExecutionProvider'])
        input_name1 = sess.get_inputs()[0].name
        input_name2 = sess.get_inputs()[1].name
        input_name3 = sess.get_inputs()[2].name
        input_name4 = sess.get_inputs()[3].name
        input_name5 = sess.get_inputs()[4].name
        pred_onnx = sess.run(None, {
            input_name1: scores_data,
            input_name2: bbox_deltas_data,
            input_name3: im_info_data,
            input_name4: anchors_data,
            input_name5: variances_data
        })
        compare(pred_onnx, result, 1e-5, 1e-5)