Repository navigation
FIX restore ShallowFBCSPNet split_first_layer=False - #1212
bruAristimunha merged 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1212 +/- ##
==========================================
+ Coverage 87.84% 87.87% +0.02%
==========================================
Files 151 151
Lines 17602 17610 +8
==========================================
+ Hits 15462 15474 +12
+ Misses 2140 2136 -4 🚀 New features to boost your workflow:
|
|
Exact-head validation is green on |
|
Superseding my earlier validation note: the current PR head is |
31ff3aa to
02e048f
Compare
Resolved docs/whats_new.rst by keeping both changelog entries.
bruAristimunha
left a comment
There was a problem hiding this comment.
Thanks for the fix (#1211). Reproduced the construction crash on master; unsplit path and legacy state-dict loading verified; default path bit-identical.
Conflict resolution: - docs/whats_new.rst: kept both the braindecode#1232 from_pretrained geometry-kwargs bug-fix entry and master's braindecode#1207/braindecode#1212 Deep4Net/ShallowFBCSPNet bug-fix entries. - test/unit_tests/models/test_eegdino.py: kept both the braindecode#1232 geometry-kwargs test block and master's braindecode#1194 qkv-hook attention test block.
Conflict resolution: - braindecode/models/cbramod.py: kept master's braindecode#1226 PatchTokenizer on_non_divisible padding and merged the PR's _knows_geometry() helper (superset of master's _n_times/_n_chans-not-None check) into the PatchTokenizer n_times arg, final_layer construction (both __init__ sites), reset_head, and _n_patch. - docs/whats_new.rst: kept both the braindecode#1233 CBraMod lazy-head bug-fix entry and master's braindecode#1207/braindecode#1212 Deep4Net/ShallowFBCSPNet bug-fix entries. - test/unit_tests/models/test_foundation_models.py: kept master's MAPA/PopT test blocks and the PR's test_cbramod_head_is_concrete_when_geometry_is_derived.
Fixes #1211.
The CombinedConv migration left two split-only assumptions unconditional in
ShallowFBCSPNet: initialization accessesconv_time_spat.conv_timeeven whensplit_first_layer=False, and legacyconv_time.*keys are always remapped throughconv_time_spat.This restores the historical two-mode contract:
conv_timemodule and keep legacyconv_time.*checkpoint keys on that module;The regression is confirmed against Braindecode v0.7.0, where the unsplit path initialized
self.conv_timedirectly.Regression tests cover:
split_first_layer=False;conv_timeand absence ofconv_time_spat;The default
split_first_layer=Truepath is unchanged.