Fix solving linear and square normalizer#35
Open
mahaitongdae wants to merge 2 commits intotypoverflow:masterfrom
Open
Fix solving linear and square normalizer#35mahaitongdae wants to merge 2 commits intotypoverflow:masterfrom
mahaitongdae wants to merge 2 commits intotypoverflow:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Align normalizer implementations with batch target mean and lower bound semantics
Overview
This PR fixes mathematical inconsistencies in the linear and squared normalizer functions. Previously, the normalizers were solving for a target sum instead of a target mean, and the squared normalizer lacked support for a non-zero lower bound.
These updates align the standalone normalizer functions ($N$ particles.
solve_normalizer_linearandsolve_normalizer_square) with the correct batch implementations (solve_v_batchandsolve_v_squared_batch), ensuring they solve for a target mean of 1 acrossChanges Made
1. Linear Normalizer Fixes
1toN. The temperature/scale (2. Squared Normalizer Fixes
0.0. It also solved for a target sum oftemp**2toN * (temp**2).Impact
This is a mathematical correctness fix. Any downstream losses, projections, or layers relying on these normalizers will now correctly target a mean of 1 across the particle dimension.