Repository navigation
FIX restore Deep4Net split_first_layer=False - #1207
bruAristimunha merged 6 commits into
Conversation
|
Exact-head validation is green on |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1207 +/- ##
=======================================
Coverage 87.84% 87.85%
=======================================
Files 151 151
Lines 17602 17606 +4
=======================================
+ Hits 15462 15467 +5
+ Misses 2140 2139 -1 🚀 New features to boost your workflow:
|
bruAristimunha
left a comment
There was a problem hiding this comment.
Thanks for catching this (#1206). We reproduced the AttributeError on master with your test, verified the branch fix and the legacy state-dict loading, and that the default split_first_layer=True path is unchanged (0.0 output diff). CI green.
Resolved docs/whats_new.rst by keeping both changelog entries.
Resolved docs/whats_new.rst by keeping both changelog entries.
bruAristimunha
left a comment
There was a problem hiding this comment.
Thanks for catching this (#1206). Reproduced the AttributeError on master with your test; fix and legacy state-dict loading verified; default path unchanged (0.0 diff).
bruAristimunha
left a comment
There was a problem hiding this comment.
Thanks for catching this (#1206). We reproduced the AttributeError on master with your test, verified the fix and the legacy state-dict loading, and that the default split_first_layer=True path is unchanged (0.0 output diff). Tests green.
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 #1206.
The CombinedConv migration made two split-only assumptions unconditional in
Deep4Net: initialization accessedconv_time_spat.conv_timeeven whensplit_first_layer=False, and legacyconv_time.*keys were always remapped throughconv_time_spat.This PR restores the two-mode contract:
conv_timemodule and keepconv_time.*checkpoint keys on that module;Regression tests construct and run the unsplit model and load a legacy-style state dict through the compatibility mapping. The default
split_first_layer=Truepath is unchanged.