提交 c72e59a6 编写于 作者: Z Zhang Ting 提交者: Aurelius84

modified cn doc of resize_bilinear for param data_format, test=develop (#1253)

上级 8976acf6
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
resize_bilinear resize_bilinear
------------------------------- -------------------------------
.. py:function:: paddle.fluid.layers.resize_bilinear(input, out_shape=None, scale=None, name=None, actual_shape=None, align_corners=True, align_mode=1) .. py:function:: paddle.fluid.layers.resize_bilinear(input, out_shape=None, scale=None, name=None, actual_shape=None, align_corners=True, align_mode=1, data_format='NCHW')
**注意:** 参数 ``actual_shape`` 将被弃用,请使用 ``out_shape`` 替代。 **注意:** 参数 ``actual_shape`` 将被弃用,请使用 ``out_shape`` 替代。
...@@ -52,17 +52,16 @@ align_corners和align_mode是可选参数,插值的计算方法可以由它们 ...@@ -52,17 +52,16 @@ align_corners和align_mode是可选参数,插值的计算方法可以由它们
参数: 参数:
- **input** (Variable) - 输入维度为[num_batches, channels, in_h, in_w]的4-D Tensor - **input** (Variable) - 4-D Tensor,数据类型为float32、float64或uint8,其数据格式由参数 ``data_format`` 指定
- **out_shape** (list|tuple|Variable|None) - 双线性层的输出形状,维度为[out_h, out_w]的二维Tensor。如果 :code:`out_shape` 是列表,每一个元素可以是整数或者维度为[1]的变量。如果 :code:`out_shape` 是变量,则其维度大小为1。默认值为None。 - **out_shape** (list|tuple|Variable|None) - 双线性层的输出形状,维度为[out_h, out_w]的二维Tensor。如果 :code:`out_shape` 是列表,每一个元素可以是整数或者维度为[1]的变量。如果 :code:`out_shape` 是变量,则其维度大小为1。默认值为None。
- **scale** (float|Variable|None) - 用于输入高度或宽度的乘数因子。out_shape和scale至少要设置一个。out_shape的优先级高于scale。默认值为None。 - **scale** (float|Variable|None) - 用于输入高度或宽度的乘数因子。out_shape和scale至少要设置一个。out_shape的优先级高于scale。默认值为None。
- **name** (str|None) - 该参数供开发人员打印调试信息时使用,具体用法请参见 :ref:`api_guide_Name` 。默认值为None。 - **name** (str|None) - 该参数供开发人员打印调试信息时使用,具体用法请参见 :ref:`api_guide_Name` 。默认值为None。
- **actual_shape** (Variable) - 可选输入,用于动态指定输出形状。如果指定actual_shape,图像将根据给定的形状调整大小,而不是根据指定形状的 :code:`out_shape` 和 :code:`scale` 进行调整。也就是说, :code:`actual_shape` 具有最高的优先级。如果希望动态指定输出形状,建议使用 :code:`out_shape` , 因为 :code:`out_shape` 未来将被弃用。在使用actual_shape指定输出形状时,还需要设置out_shape和scale之一,否则在图形构建阶段会出现错误。默认值为None。 - **actual_shape** (Variable) - 可选输入,用于动态指定输出形状。如果指定actual_shape,图像将根据给定的形状调整大小,而不是根据指定形状的 :code:`out_shape` 和 :code:`scale` 进行调整。也就是说, :code:`actual_shape` 具有最高的优先级。如果希望动态指定输出形状,建议使用 :code:`out_shape` , 因为 :code:`out_shape` 未来将被弃用。在使用actual_shape指定输出形状时,还需要设置out_shape和scale之一,否则在图形构建阶段会出现错误。默认值为None。
- **align_corners** (bool)- 一个可选的bool型参数,如果为True,则将输入和输出张量的4个角落像素的中心对齐,并保留角点像素的值。 默认值为True - **align_corners** (bool)- 一个可选的bool型参数,如果为True,则将输入和输出张量的4个角落像素的中心对齐,并保留角点像素的值。 默认值为True
- **align_mode** (int)- 双线性插值的可选项。 可以是'0'代表src_idx = scale *(dst_indx + 0.5)-0.5;如果为'1' ,代表src_idx = scale * dst_index。 - **align_mode** (int)- 双线性插值的可选项。 可以是'0'代表src_idx = scale *(dst_indx + 0.5)-0.5;如果为'1' ,代表src_idx = scale * dst_index。
- **data_format** (str,可选)- 数据格式,支持 NCHW(num_batches, channels, height, width) 或者 NHWC(num_batches, height, width, channels),默认值:'NCHW'。
返回:4-D Tensor,形状为 (num_batches, channels, out_h, out_w) 或 (num_batches, out_h, out_w, channels)。
返回:维度为[num_batches, channels, out_h, out_w]的4-D Tensor。
**代码示例** **代码示例**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册