Repository navigation
FIX IFNet applies its reference initialization (it initialized nothing) - #1453
Merged
bruAristimunha merged 1 commit intoOct 18, 2026
Merged
Conversation
bruAristimunha
force-pushed
the
cleanup/t17-ifnet-init
branch
from
October 18, 2026 00:03
fa78a82 to
75c82cc
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1453 +/- ##
==========================================
- Coverage 91.04% 91.04% -0.01%
==========================================
Files 165 165
Lines 21653 21643 -10
==========================================
- Hits 19714 19704 -10
Misses 1939 1939 🚀 New features to boost your workflow:
|
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.
Part of #1442. Stacked on #1452 (merge that first).
IFNet._initialize_weightswas called on the model itself (self._initialize_weights(self)) instead of throughself.apply(...), so it initialized nothing: the convolutions and the max-norm head kept PyTorch's defaults (std 0.03–0.12). IFNet now applies its reference initialization (self.apply(self.initParms)in https://github.com/Jiaheng-Wang/IFNet,TEEGM/models/IFNet.py): truncated normal, std 0.01, for linears and convolutions (the max-norm head through its stored weight), zero biases, unit/zero batch norms.This changes IFNet's initial weights (whats_new says so). A new test (
test_ifnet_initializes_like_the_reference) fails before and passes after; the existingtest_initialize_weights_*tests and the all-models init test pass.