Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PaddlePaddle Hackathon 4 No.53】:为 Paddle label_smooth 支持 float16 数据类型 #5642

Merged
merged 3 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/api/paddle/fluid/layers/label_smooth_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ label_smooth
- **label** (Variable) - 包含标签数据的输入变量。标签数据应使用 one-hot 表示,是维度为 :math:`[N_1, ..., Depth]` 的多维Tensor,其中Depth为字典大小。
- **prior_dist** (Variable,可选) - 用于平滑标签的先验分布,是维度为 :math:`[1,class\_num]` 的2D Tensor。如果未设置,则使用均匀分布。默认值为None。
- **epsilon** (float,可选) - 用于混合原始真实分布和固定分布的权重。默认值为0.1。
- **dtype** (np.dtype|core.VarDesc.VarType|str,可选) - 输入 ``Tensor`` 的数据类型,数据类型可以为float32“或”float64“。默认值为”float32“。
- **dtype** (np.dtype|core.VarDesc.VarType|str,可选) - 输入 ``Tensor`` 的数据类型,数据类型可以为“float16”,float32“或”float64“。默认值为”float32“。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。

返回
Expand All @@ -42,4 +42,4 @@ label_smooth
代码示例
::::::::::::

COPY-FROM: paddle.fluid.layers.label_smooth
COPY-FROM: paddle.fluid.layers.label_smooth
2 changes: 1 addition & 1 deletion docs/api/paddle/nn/functional/label_smooth_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ label_smooth
参数
::::::::::::

- **label** (Tensor) - 包含标签数据的输入变量。标签数据应使用 one-hot 表示,是维度为 :math:`[N_1, ..., Depth]` 的多维 Tensor,其中 Depth 为字典大小。
- **label** (Tensor) - 包含标签数据的输入变量,数据类型为:float16、float32、float64。标签数据应使用 one-hot 表示,是维度为 :math:`[N_1, ..., Depth]` 的多维 Tensor,其中 Depth 为字典大小。
- **prior_dist** (Tensor,可选) - 用于平滑标签的先验分布,是维度为 :math:`[1,class\_num]` 的 2D Tensor。如果未设置,则使用均匀分布。默认值为 None。
- **epsilon** (float,可选) - 用于混合原始真实分布和固定分布的权重。默认值为 0.1。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。
Expand Down