Skip to content

Commit

Permalink
fix some format issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo authored Jul 13, 2022
1 parent 017901b commit 86f6e1b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/api/paddle/vision/transforms/Normalize_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Normalize

- mean (list|tuple) - 用于每个通道归一化的均值。
- std (list|tuple) - 用于每个通道归一化的标准差值。
- data_format (str, optional): 数据的格式,必须为 'HWC' 或 'CHW'。 默认值: 'CHW'。
- data_format (str, optional) - 数据的格式,必须为 'HWC' 或 'CHW'。 默认值: 'CHW'。
- to_rgb (bool, optional) - 是否转换为 ``rgb`` 的格式。默认值:False。

形状
Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/vision/transforms/Pad_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pad
参数
:::::::::

- padding (int|list|tuple) - 在图像边界上进行填充的范围。如果提供的是单个 int 值,则该值用于填充图像所有边;如果提供的是长度为 2 的元组/列表,则分别为图像左/右和顶部/底部进行填充;如果提供的是长度为 4 的元组/列表,则按照左,上,右和下的顺序为图像填充。
- padding (int|list|tuple) - 在图像边界上进行填充的范围。如果提供的是单个 int 值,则该值用于填充图像所有边;如果提供的是长度为 2 的元组/列表,则分别为图像左/右和顶部/底部进行填充;如果提供的是长度为 4 的元组/列表,则按照左,上,右和下的顺序为图像填充。
- fill (int|list|tuple) - 用于填充的像素值。仅当 padding_mode 为 constant 时参数值有效。 默认值:0。 如果参数值是一个长度为 3 的元组,则会分别用于填充 R,G,B 通道。
- padding_mode (string) - 填充模式。支持: constant, edge, reflect 或 symmetric。 默认值:constant。 ``constant`` 表示使用常量值进行填充,该值由 fill 参数指定。``edge`` 表示使用图像边缘像素值进行填充。``reflect`` 表示使用原图像的镜像值进行填充(不使用边缘上的值);比如:使用该模式对 ``[1, 2, 3, 4]`` 的两端分别填充 2 个值,结果是 ``[3, 2, 1, 2, 3, 4, 3, 2]``。``symmetric`` 表示使用原图像的镜像值进行填充(使用边缘上的值);比如:使用该模式对 ``[1, 2, 3, 4]`` 的两端分别填充 2 个值,结果是 ``[2, 1, 1, 2, 3, 4, 4, 3]``。
- keys (list[str]|tuple[str], optional) - 与 ``BaseTransform`` 定义一致。默认值: None。
Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/vision/transforms/normalize_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ normalize
- img (PIL.Image|np.array|paddle.Tensor) - 用于归一化的数据。
- mean (list|tuple) - 用于每个通道归一化的均值。
- std (list|tuple) - 用于每个通道归一化的标准差值。
- data_format (str, optional)数据的格式,必须为 'HWC' 或 'CHW'。默认值:'CHW'。
- data_format (str, optional) - 数据的格式,必须为 'HWC' 或 'CHW'。默认值:'CHW'。
- to_rgb (bool, optional) - 是否转换为 ``rgb`` 的格式。默认值:False。

返回
Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/vision/transforms/pad_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pad
:::::::::

- img (PIL.Image|np.ndarray) - 被填充的图像。
- padding (int|list|tuple) - 在图像边界上进行填充的范围。如果提供的是单个 int 值,则该值用于填充图像所有边;如果提供的是长度为 2 的元组/列表,则分别为图像左/右和顶部/底部进行填充;如果提供的是长度为 4 的元组/列表,则按照左,上,右和下的顺序为图像填充。
- padding (int|list|tuple) - 在图像边界上进行填充的范围。如果提供的是单个 int 值,则该值用于填充图像所有边;如果提供的是长度为 2 的元组/列表,则分别为图像左/右和顶部/底部进行填充;如果提供的是长度为 4 的元组/列表,则按照左,上,右和下的顺序为图像填充。
- fill (int|tuple) - 用于填充的像素值。仅当 padding_mode 为 constant 时参数值有效。默认值:0。如果参数值是一个长度为 3 的元组,则会分别用于填充 R,G,B 通道。
- padding_mode (string) - 填充模式。支持:constant, edge, reflect 或 symmetric。默认值:constant。 ``constant`` 表示使用常量值进行填充,该值由 fill 参数指定。``edge`` 表示使用图像边缘像素值进行填充。``reflect`` 表示使用原图像的镜像值进行填充(不使用边缘上的值);比如:使用该模式对 ``[1, 2, 3, 4]`` 的两端分别填充 2 个值,结果是 ``[3, 2, 1, 2, 3, 4, 3, 2]``。``symmetric`` 表示使用原图像的镜像值进行填充(使用边缘上的值);比如:使用该模式对 ``[1, 2, 3, 4]`` 的两端分别填充 2 个值,结果是 ``[2, 1, 1, 2, 3, 4, 4, 3]``。

Expand Down

0 comments on commit 86f6e1b

Please sign in to comment.