@templatedoc(op_type='yolo_box')
def yolo_box(x, img_size, anchors, class_num, conf_thresh, downsample_ratio, clip_bbox=True, name=None, scale_x_y=1.0):
    "\n\t:alias_main: paddle.nn.functional.yolo_box\n\t:alias: paddle.nn.functional.yolo_box,paddle.nn.functional.vision.yolo_box\n\t:old_api: paddle.fluid.layers.yolo_box\n\n    ${comment}\n\n    Args:\n        x (Variable): ${x_comment} The data type is float32 or float64. \n        img_size (Variable): ${img_size_comment} The data type is int32. \n        anchors (list|tuple): ${anchors_comment}\n        class_num (int): ${class_num_comment}\n        conf_thresh (float): ${conf_thresh_comment}\n        downsample_ratio (int): ${downsample_ratio_comment}\n        clip_bbox (bool): ${clip_bbox_comment}\n        scale_x_y (float): ${scale_x_y_comment}\n        name (string): The default value is None.  Normally there is no need \n                       for user to set this property.  For more information, \n                       please refer to :ref:`api_guide_Name`\n\n    Returns:\n        Variable: A 3-D tensor with shape [N, M, 4], the coordinates of boxes,\n        and a 3-D tensor with shape [N, M, :attr:`class_num`], the classification \n        scores of boxes.\n\n    Raises:\n        TypeError: Input x of yolov_box must be Variable\n        TypeError: Attr anchors of yolo box must be list or tuple\n        TypeError: Attr class_num of yolo box must be an integer\n        TypeError: Attr conf_thresh of yolo box must be a float number\n\n    Examples:\n\n    .. code-block:: python\n\n        import paddle.fluid as fluid\n        x = fluid.data(name='x', shape=[None, 255, 13, 13], dtype='float32')\n        img_size = fluid.data(name='img_size',shape=[None, 2],dtype='int64')\n        anchors = [10, 13, 16, 30, 33, 23]\n        boxes,scores = fluid.layers.yolo_box(x=x, img_size=img_size, class_num=80, anchors=anchors, \n                                        conf_thresh=0.01, downsample_ratio=32)\n    "
    helper = LayerHelper('yolo_box', **locals())
    if (not isinstance(x, Variable)):
        raise TypeError('Input x of yolo_box must be Variable')
    if (not isinstance(img_size, Variable)):
        raise TypeError('Input img_size of yolo_box must be Variable')
    if ((not isinstance(anchors, list)) and (not isinstance(anchors, tuple))):
        raise TypeError('Attr anchors of yolo_box must be list or tuple')
    if (not isinstance(class_num, int)):
        raise TypeError('Attr class_num of yolo_box must be an integer')
    if (not isinstance(conf_thresh, float)):
        raise TypeError('Attr ignore_thresh of yolo_box must be a float number')
    boxes = helper.create_variable_for_type_inference(dtype=x.dtype)
    scores = helper.create_variable_for_type_inference(dtype=x.dtype)
    attrs = {'anchors': anchors, 'class_num': class_num, 'conf_thresh': conf_thresh, 'downsample_ratio': downsample_ratio, 'clip_bbox': clip_bbox, 'scale_x_y': scale_x_y}
    helper.append_op(type='yolo_box', inputs={'X': x, 'ImgSize': img_size}, outputs={'Boxes': boxes, 'Scores': scores}, attrs=attrs)
    return (boxes, scores)
:alias_main: paddle.nn.functional.yolo_box
    :alias: paddle.nn.functional.yolo_box,paddle.nn.functional.vision.yolo_box
    :old_api: paddle.fluid.layers.yolo_box

${comment}

Args:
    x (Variable): ${x_comment} The data type is float32 or float64. 
    img_size (Variable): ${img_size_comment} The data type is int32. 
    anchors (list|tuple): ${anchors_comment}
    class_num (int): ${class_num_comment}
    conf_thresh (float): ${conf_thresh_comment}
    downsample_ratio (int): ${downsample_ratio_comment}
    clip_bbox (bool): ${clip_bbox_comment}
    scale_x_y (float): ${scale_x_y_comment}
    name (string): The default value is None.  Normally there is no need 
                   for user to set this property.  For more information, 
                   please refer to :ref:`api_guide_Name`

Returns:
    Variable: A 3-D tensor with shape [N, M, 4], the coordinates of boxes,
    and a 3-D tensor with shape [N, M, :attr:`class_num`], the classification 
    scores of boxes.

Raises:
    TypeError: Input x of yolov_box must be Variable
    TypeError: Attr anchors of yolo box must be list or tuple
    TypeError: Attr class_num of yolo box must be an integer
    TypeError: Attr conf_thresh of yolo box must be a float number

Examples:

.. code-block:: python

    import paddle.fluid as fluid
    x = fluid.data(name='x', shape=[None, 255, 13, 13], dtype='float32')
    img_size = fluid.data(name='img_size',shape=[None, 2],dtype='int64')
    anchors = [10, 13, 16, 30, 33, 23]
    boxes,scores = fluid.layers.yolo_box(x=x, img_size=img_size, class_num=80, anchors=anchors, 
                                    conf_thresh=0.01, downsample_ratio=32)
@templatedoc(op_type='yolo_box')
def yolo_box(x, img_size, anchors, class_num, conf_thresh, downsample_ratio, clip_bbox=True, name=None, scale_x_y=1.0):
    "\n\t:alias_main: paddle.nn.functional.yolo_box\n\t:alias: paddle.nn.functional.yolo_box,paddle.nn.functional.vision.yolo_box\n\t:old_api: paddle.fluid.layers.yolo_box\n\n    ${comment}\n\n    Args:\n        x (Variable): ${x_comment} The data type is float32 or float64. \n        img_size (Variable): ${img_size_comment} The data type is int32. \n        anchors (list|tuple): ${anchors_comment}\n        class_num (int): ${class_num_comment}\n        conf_thresh (float): ${conf_thresh_comment}\n        downsample_ratio (int): ${downsample_ratio_comment}\n        clip_bbox (bool): ${clip_bbox_comment}\n        scale_x_y (float): ${scale_x_y_comment}\n        name (string): The default value is None.  Normally there is no need \n                       for user to set this property.  For more information, \n                       please refer to :ref:`api_guide_Name`\n\n    Returns:\n        Variable: A 3-D tensor with shape [N, M, 4], the coordinates of boxes,\n        and a 3-D tensor with shape [N, M, :attr:`class_num`], the classification \n        scores of boxes.\n\n    Raises:\n        TypeError: Input x of yolov_box must be Variable\n        TypeError: Attr anchors of yolo box must be list or tuple\n        TypeError: Attr class_num of yolo box must be an integer\n        TypeError: Attr conf_thresh of yolo box must be a float number\n\n    Examples:\n\n    .. code-block:: python\n\n        import paddle.fluid as fluid\n        x = fluid.data(name='x', shape=[None, 255, 13, 13], dtype='float32')\n        img_size = fluid.data(name='img_size',shape=[None, 2],dtype='int64')\n        anchors = [10, 13, 16, 30, 33, 23]\n        boxes,scores = fluid.layers.yolo_box(x=x, img_size=img_size, class_num=80, anchors=anchors, \n                                        conf_thresh=0.01, downsample_ratio=32)\n    "
    helper = LayerHelper('yolo_box', **locals())
    if (not isinstance(x, Variable)):
        raise TypeError('Input x of yolo_box must be Variable')
    if (not isinstance(img_size, Variable)):
        raise TypeError('Input img_size of yolo_box must be Variable')
    if ((not isinstance(anchors, list)) and (not isinstance(anchors, tuple))):
        raise TypeError('Attr anchors of yolo_box must be list or tuple')
    if (not isinstance(class_num, int)):
        raise TypeError('Attr class_num of yolo_box must be an integer')
    if (not isinstance(conf_thresh, float)):
        raise TypeError('Attr ignore_thresh of yolo_box must be a float number')
    boxes = helper.create_variable_for_type_inference(dtype=x.dtype)
    scores = helper.create_variable_for_type_inference(dtype=x.dtype)
    attrs = {'anchors': anchors, 'class_num': class_num, 'conf_thresh': conf_thresh, 'downsample_ratio': downsample_ratio, 'clip_bbox': clip_bbox, 'scale_x_y': scale_x_y}
    helper.append_op(type='yolo_box', inputs={'X': x, 'ImgSize': img_size}, outputs={'Boxes': boxes, 'Scores': scores}, attrs=attrs)
    return (boxes, scores)