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

Zero_infinity option for ctc loss #4415

Merged
merged 1 commit into from
Jun 3, 2022
Merged

Conversation

kamo-naoyuki
Copy link
Collaborator

When I implemented ignore_nan_grad for ctc modules of espnet2, pytorch-ctc didn't have the zero_infinity option.

ignore_nan_grad is not so efficient and looks complicated impelemetation, so I changed it to use the zero_infinity option. (ESPnet1 already used it.)

Note that this CTC class has both ignore_nan_grad and zero_infinity options and ignore_nan_grad is an alias of zero_infinity. I left ignore_nan_grad for backward compatiblity.

@mergify mergify bot added the ESPnet2 label Jun 2, 2022
@kamo-naoyuki kamo-naoyuki force-pushed the zero_infinity branch 2 times, most recently from 57c342c to 315bfef Compare June 2, 2022 05:50
@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #4415 (cdea46d) into master (45e8cb9) will increase coverage by 0.01%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master    #4415      +/-   ##
==========================================
+ Coverage   82.55%   82.56%   +0.01%     
==========================================
  Files         469      469              
  Lines       40228    40213      -15     
==========================================
- Hits        33211    33203       -8     
+ Misses       7017     7010       -7     
Flag Coverage Δ
test_integration_espnet1 66.58% <ø> (ø)
test_integration_espnet2 49.55% <50.00%> (+<0.01%) ⬆️
test_python 69.36% <83.33%> (+<0.01%) ⬆️
test_utils 23.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
espnet2/asr/ctc.py 95.08% <83.33%> (+8.23%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@kamo-naoyuki kamo-naoyuki added Refactoring Refactoring ASR Automatic speech recogntion labels Jun 2, 2022
@kamo-naoyuki kamo-naoyuki added this to the v.202206 milestone Jun 2, 2022
Copy link
Contributor

@sw005320 sw005320 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Thanks, @kamo-naoyuki

@kamo-naoyuki kamo-naoyuki added the auto-merge Enable auto-merge label Jun 2, 2022
@mergify mergify bot merged commit 5f6ede9 into espnet:master Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASR Automatic speech recogntion auto-merge Enable auto-merge ESPnet2 Refactoring Refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants