Commit 8c7e02b
authored
[API] Move the
* Enhance CTC loss with zero_infinity parameter
Added 'zero_infinity' parameter to CTC loss initialization and forward method.
* Refactor constructor in loss.py for clarity
* Change zero_infinity type to optional boolean
* Add Optional import to loss.py
* Change default value of zero_infinity to False
* Remove unnecessary import of Optional from typing
* Update zero_infinity handling in ctc_loss function
Refactor zero_infinity parameter handling in CTC loss.zero_infinity parameter of CTCLoss from the forward function to the constructor (#76156)1 parent 09eb01f commit 8c7e02b
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1340 | 1340 | | |
1341 | 1341 | | |
1342 | 1342 | | |
1343 | | - | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
1344 | 1349 | | |
1345 | 1350 | | |
1346 | 1351 | | |
| 1352 | + | |
1347 | 1353 | | |
1348 | 1354 | | |
1349 | 1355 | | |
| |||
1352 | 1358 | | |
1353 | 1359 | | |
1354 | 1360 | | |
1355 | | - | |
1356 | 1361 | | |
1357 | 1362 | | |
1358 | 1363 | | |
| |||
1362 | 1367 | | |
1363 | 1368 | | |
1364 | 1369 | | |
1365 | | - | |
| 1370 | + | |
1366 | 1371 | | |
1367 | 1372 | | |
1368 | 1373 | | |
| |||
0 commit comments