-
Notifications
You must be signed in to change notification settings - Fork 870
[docs] Update ctc_loss function parameters in documentation #7597
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
Changes from 17 commits
861e065
8aea29b
4805fed
911e071
a7dbb69
a522d60
5e2485f
5b1fd08
5e6d2b0
1c16808
824b086
ef9bf4b
5ca99f2
7a2fcdd
2f8a8ce
f8418d9
3f04a81
9217066
85ad57a
0f7b3cb
5c9841f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
aztice marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| ctc_loss | ||
| ------------------------------- | ||
|
|
||
| .. py:function:: paddle.nn.functional.ctc_loss(log_probs, labels, input_lengths, label_lengths, blank=0, reduction='mean') | ||
| .. py:function:: paddle.nn.functional.ctc_loss(log_probs, labels, input_lengths, label_lengths, blank=0, reduction='mean', norm_by_times=False, zero_infinity=False) | ||
|
|
||
| 计算 CTC loss。该接口的底层调用了第三方 baidu-research::warp-ctc 的实现。 | ||
| 也可以叫做 softmax with CTC,因为 Warp-CTC 库中插入了 softmax 激活函数来对输入的值进行归一化。 | ||
|
|
@@ -17,6 +17,7 @@ ctc_loss | |
| - **blank** (int,可选) - 空格标记的 ID 值,其取值范围为 [0, num_classes + 1)。数据类型支持 int32。默认值为 0。 | ||
| - **reduction** (str,可选) - 指定应用于输出结果的计算方式,可选值有:``'none'``, ``'mean'``, ``'sum'``。设置为 ``'mean'`` 时,对 loss 值除以 label_lengths,并返回所得商的均值;设置为 ``'sum'`` 时,返回 loss 值的总和;设置为 ``'none'`` 时,则直接返回输出的 loss 值。默认值为 ``'mean'``。 | ||
| - **norm_by_times** (bool,可选) - 是否根据序列长度对梯度进行正则化。数据类型支持 bool。默认值为 False。 | ||
| - **zero_infinity** (bool,可选) - 如果 ``true``,将 可能 输出无限的 ``loss`` 设置为 ``0``。默认值: False。 | ||
|
||
|
|
||
| 返回 | ||
| ::::::::: | ||
|
|
||
aztice marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.