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

modified cn doc of resize_trilinear for param data_format, test=develop (#1254)

上级 50db8512
......@@ -3,7 +3,7 @@
resize_trilinear
-------------------------------
.. py:function:: paddle.fluid.layers.resize_trilinear(input, out_shape=None, scale=None, name=None, actual_shape=None, align_corners=True, align_mode=1)
.. py:function:: paddle.fluid.layers.resize_trilinear(input, out_shape=None, scale=None, name=None, actual_shape=None, align_corners=True, align_mode=1, data_format='NCDHW')
**注意:** 参数 ``actual_shape`` 将被弃用,请使用 ``out_shape`` 替代。
......@@ -47,15 +47,16 @@ Align_corners和align_mode都是可选参数,可以用来设置插值的计算
W_out = W_{in} * scale_{factor}
参数:
- **input** (Variable) – 输入是shape为(num_batches, channels, in_d, in_h, in_w)的5-D张量
- **input** (Variable) – 5-D Tensor,数据类型为float32、float64或uint8,其数据格式由参数 ``data_format`` 指定
- **out_shape** (list|tuple|Variable|None) – 调整最近邻层的输出形状,形式为(out_h, out_w)。默认值:None。如果 :code:`out_shape` 是列表,每一个元素可以是整数或者shape为[1]的变量。如果 :code:`out_shape` 是变量,则其维度大小为1。
- **scale** (float|None) – 输入高、宽的乘法器。 ``out_shape`` 和 ``scale`` 二者至少设置其一。 ``out_shape`` 具有比 ``scale`` 更高的优先级。 默认: None
- **name** (str|None) – 输出变量的命名
- **actual_shape** (Variable) – 可选输入, 动态设置输出张量的形状。 如果提供该值, 图片放缩会依据此形状进行, 而非依据 ``out_shape`` 和 ``scale`` 。 即为, ``actual_shape`` 具有最高的优先级。 如果想动态指明输出形状,推荐使用 ``out_shape`` ,因为 ``actual_shape`` 未来将被弃用。 当使用 ``actual_shape`` 来指明输出形状, ``out_shape`` 和 ``scale`` 也应该进行设置, 否则在图形生成阶段将会报错。默认: None
- **align_corners** (bool)- 一个可选的bool型参数,如果为True,则将输入和输出张量的4个角落像素的中心对齐,并保留角点像素的值。 默认值:True
- **align_mode** (bool) - (int,默认为'1'),双线性插值选项,src_idx = scale*(dst_index+0.5)-0.5时取'0',src_idx = scale*dst_index时取'1'。
- **data_format** (str,可选)- 支持 NCDHW(num_batches, channels, depth, height, width)或者 NDHWC(num_batches, depth, height, width, channels),默认值:'NCDHW'。
返回:形为(num_batches, channels, out_d, out_h, out_w)的5-D张量
返回:5-D Tensor,形状为 (num_batches, channels, out_d, out_h, out_w) 或 (num_batches, out_d, out_h, out_w, channels)。
**代码示例**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册