Skip to content

FIX IFNet applies its reference initialization (it initialized nothing) - #1453

Merged
bruAristimunha merged 1 commit into
braindecode:masterfrom
bruAristimunha:cleanup/t17-ifnet-init
Oct 18, 2026
Merged

bruAristimunha merged 1 commit into
braindecode:masterfrom
bruAristimunha:cleanup/t17-ifnet-init

Conversation

@bruAristimunha

Copy link
Copy Markdown
Collaborator

Part of #1442. Stacked on #1452 (merge that first).

IFNet._initialize_weights was called on the model itself (self._initialize_weights(self)) instead of through self.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 existing test_initialize_weights_* tests and the all-models init test pass.

Copilot AI balanced review requested due to automatic review settings October 17, 2026 19:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI balanced review requested due to automatic review settings October 18, 2026 00:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Oct 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.04%. Comparing base (47912a9) to head (75c82cc).

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bruAristimunha
bruAristimunha merged commit 3773036 into braindecode:master Oct 18, 2026
10 checks passed
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.

2 participants