Open
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
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