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

update mean reduction zloss to ignore labels == ignore_index #760

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jasonkrone
Copy link

When reduction == "mean", the current implementation sets the z_squared values to 0 vs. ignoring them. These 0 values impact the number of element in the mean reduction and therefore the final z-loss.

Perhaps this is intentional, but just in case it's not, I made a quick PR to ignore the values vs. setting them to 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant