Skip to content

CEWithChunkedOutputLoss does not check division by zero #2341

Open
@pocca2048

Description

Similar to #2225, CEWithChunkedOutputLoss does not check division by zero, too.
This makes a loss nan.

total_elements = (labels != self.ignore_index).sum()
...
return total_loss / total_elements

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

discussionStart a discussiontriagedThis issue has been assigned an owner and appropriate label

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions