Braindecode 1.2.0__tar.gz → 1.2.0.dev169062562__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {braindecode-1.2.0/braindecode.egg-info → braindecode-1.2.0.dev169062562}/PKG-INFO +2 -7
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/__init__.py +8 -6
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/atcnet.py +12 -152
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/attentionbasenet.py +26 -151
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/ctnet.py +1 -1
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/deep4.py +2 -6
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/deepsleepnet.py +5 -118
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/eegconformer.py +15 -114
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/eeginception_erp.py +7 -76
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/eeginception_mi.py +0 -2
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/eegnet.py +176 -62
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/eegnex.py +6 -113
- braindecode-1.2.0.dev169062562/braindecode/models/eegresnet.py +362 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/eegsimpleconv.py +0 -2
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/eegtcnet.py +1 -1
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/sccnet.py +8 -79
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/shallow_fbcsp.py +0 -2
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/sleep_stager_blanco_2020.py +0 -2
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/sleep_stager_chambon_2018.py +0 -2
- braindecode-1.2.0/braindecode/models/attn_sleep.py → braindecode-1.2.0.dev169062562/braindecode/models/sleep_stager_eldele_2021.py +2 -12
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/sparcnet.py +0 -2
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/summary.csv +41 -39
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/tidnet.py +0 -2
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/tsinception.py +3 -15
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/usleep.py +9 -103
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/util.py +5 -5
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/modules/attention.py +3 -6
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/modules/convolution.py +7 -10
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/modules/filter.py +6 -8
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/training/scoring.py +8 -2
- braindecode-1.2.0.dev169062562/braindecode/version.py +1 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/visualization/gradients.py +1 -6
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562/braindecode.egg-info}/PKG-INFO +2 -7
- braindecode-1.2.0.dev169062562/braindecode.egg-info/SOURCES.txt +120 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode.egg-info/requires.txt +0 -5
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/docs/api.rst +11 -16
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/docs/conf.py +14 -39
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/docs/index.rst +3 -3
- braindecode-1.2.0.dev169062562/docs/models_summary.rst +134 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/docs/sg_execution_times.rst +63 -66
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/docs/whats_new.rst +2 -19
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/pyproject.toml +5 -11
- braindecode-1.2.0/braindecode/datasets/experimental.py +0 -218
- braindecode-1.2.0/braindecode/version.py +0 -1
- braindecode-1.2.0/braindecode.egg-info/SOURCES.txt +0 -395
- braindecode-1.2.0/docs/_build/html/_downloads/090305d06248840b75133975e5121f41/plot_sleep_staging_chambon2018.ipynb +0 -291
- braindecode-1.2.0/docs/_build/html/_downloads/0f2bf063e08b7d05b80e0004fcbbb6f9/benchmark_lazy_eager_loading.ipynb +0 -183
- braindecode-1.2.0/docs/_build/html/_downloads/1c6590d134fa0befda654e89aa55b2ac/plot_benchmark_preprocessing.ipynb +0 -104
- braindecode-1.2.0/docs/_build/html/_downloads/1d879df548fa18be8c23d9ca0dc008d4/plot_data_augmentation.ipynb +0 -259
- braindecode-1.2.0/docs/_build/html/_downloads/2466f8ec5c733d0bd65e187b45d875cc/plot_data_augmentation_search.ipynb +0 -302
- braindecode-1.2.0/docs/_build/html/_downloads/263464a28477cf8decb861ae6e2e9be7/plot_how_train_test_and_tune.ipynb +0 -375
- braindecode-1.2.0/docs/_build/html/_downloads/3862cafd7f0d815e434319ffe525afc8/plot_bcic_iv_2a_moabb_cropped.ipynb +0 -226
- braindecode-1.2.0/docs/_build/html/_downloads/408ca4ffd0ea1f76faa9ef602734ac94/plot_tuh_eeg_corpus.ipynb +0 -187
- braindecode-1.2.0/docs/_build/html/_downloads/5030717acb00990b394b83314b0797d9/plot_bids_dataset_example.ipynb +0 -97
- braindecode-1.2.0/docs/_build/html/_downloads/75a73c7d94f3a671fd3dec28f4031ead/plot_regression.ipynb +0 -212
- braindecode-1.2.0/docs/_build/html/_downloads/84fbcd59a346e5e56758285122dc69e2/plot_sleep_staging_eldele2021.ipynb +0 -291
- braindecode-1.2.0/docs/_build/html/_downloads/8616a7f968141825e56ab3e3d59be449/plot_tuh_discrete_multitarget.ipynb +0 -169
- braindecode-1.2.0/docs/_build/html/_downloads/8b5ba06718764b959e8dea1dd0bb97df/plot_sleep_staging_usleep.ipynb +0 -255
- braindecode-1.2.0/docs/_build/html/_downloads/91651c9d4fde110b4a53f5775a91acc5/plot_mne_dataset_example.ipynb +0 -104
- braindecode-1.2.0/docs/_build/html/_downloads/93fdea8cbadaf0e3afa2eb2be3ebc483/bcic_iv_4_ecog_trial.ipynb +0 -376
- braindecode-1.2.0/docs/_build/html/_downloads/9a4447462c3b255ba7e5ca212bbadd52/plot_bcic_iv_2a_moabb_trial.ipynb +0 -253
- braindecode-1.2.0/docs/_build/html/_downloads/a2f12129facb042643a99d4b9de1886d/bcic_iv_4_ecog_cropped.ipynb +0 -345
- braindecode-1.2.0/docs/_build/html/_downloads/a39e4245738e55e0eb7084c545ed05bc/plot_hyperparameter_tuning_with_scikit-learn.ipynb +0 -257
- braindecode-1.2.0/docs/_build/html/_downloads/a6249715d3c30cb41c4af85938cca008/plot_moabb_dataset_example.ipynb +0 -140
- braindecode-1.2.0/docs/_build/html/_downloads/a86d0c5f3a882a069df1683a708d3e25/plot_train_in_pure_pytorch_and_pytorch_lightning.ipynb +0 -250
- braindecode-1.2.0/docs/_build/html/_downloads/aa8426d97090e7b3062c4e4732c3214a/plot_relative_positioning.ipynb +0 -266
- braindecode-1.2.0/docs/_build/html/_downloads/b9d19304ecd233ea7a79d4365316ea49/plot_load_save_datasets.ipynb +0 -176
- braindecode-1.2.0/docs/_build/html/_downloads/cb62940d13f700ed2b9e813705e9d437/plot_moabb_benchmark.ipynb +0 -122
- braindecode-1.2.0/docs/_build/html/_downloads/f3c89d39e947a121c7920b4d415413a2/plot_split_dataset.ipynb +0 -180
- braindecode-1.2.0/docs/_build/html/_downloads/f7b38cac92c078838442753121efc297/plot_custom_dataset_example.ipynb +0 -140
- braindecode-1.2.0/docs/_build/html/_downloads/fff46913db5173d3ae22c1113acffb45/plot_basic_training_epochs.ipynb +0 -219
- braindecode-1.2.0/docs/auto_examples/advanced_training/bcic_iv_4_ecog_cropped.ipynb +0 -345
- braindecode-1.2.0/docs/auto_examples/advanced_training/bcic_iv_4_ecog_cropped.rst +0 -626
- braindecode-1.2.0/docs/auto_examples/advanced_training/index.rst +0 -119
- braindecode-1.2.0/docs/auto_examples/advanced_training/plot_data_augmentation.ipynb +0 -259
- braindecode-1.2.0/docs/auto_examples/advanced_training/plot_data_augmentation.rst +0 -419
- braindecode-1.2.0/docs/auto_examples/advanced_training/plot_data_augmentation_search.ipynb +0 -302
- braindecode-1.2.0/docs/auto_examples/advanced_training/plot_data_augmentation_search.rst +0 -523
- braindecode-1.2.0/docs/auto_examples/advanced_training/plot_moabb_benchmark.ipynb +0 -122
- braindecode-1.2.0/docs/auto_examples/advanced_training/plot_moabb_benchmark.rst +0 -231
- braindecode-1.2.0/docs/auto_examples/advanced_training/plot_relative_positioning.ipynb +0 -266
- braindecode-1.2.0/docs/auto_examples/advanced_training/plot_relative_positioning.rst +0 -690
- braindecode-1.2.0/docs/auto_examples/advanced_training/sg_execution_times.rst +0 -49
- braindecode-1.2.0/docs/auto_examples/applied_examples/bcic_iv_4_ecog_trial.ipynb +0 -376
- braindecode-1.2.0/docs/auto_examples/applied_examples/bcic_iv_4_ecog_trial.rst +0 -581
- braindecode-1.2.0/docs/auto_examples/applied_examples/index.rst +0 -119
- braindecode-1.2.0/docs/auto_examples/applied_examples/plot_sleep_staging_chambon2018.ipynb +0 -291
- braindecode-1.2.0/docs/auto_examples/applied_examples/plot_sleep_staging_chambon2018.rst +0 -521
- braindecode-1.2.0/docs/auto_examples/applied_examples/plot_sleep_staging_eldele2021.ipynb +0 -291
- braindecode-1.2.0/docs/auto_examples/applied_examples/plot_sleep_staging_eldele2021.rst +0 -519
- braindecode-1.2.0/docs/auto_examples/applied_examples/plot_sleep_staging_usleep.ipynb +0 -255
- braindecode-1.2.0/docs/auto_examples/applied_examples/plot_sleep_staging_usleep.rst +0 -468
- braindecode-1.2.0/docs/auto_examples/applied_examples/plot_tuh_eeg_corpus.ipynb +0 -187
- braindecode-1.2.0/docs/auto_examples/applied_examples/plot_tuh_eeg_corpus.rst +0 -433
- braindecode-1.2.0/docs/auto_examples/applied_examples/sg_execution_times.rst +0 -49
- braindecode-1.2.0/docs/auto_examples/datasets_io/benchmark_lazy_eager_loading.ipynb +0 -183
- braindecode-1.2.0/docs/auto_examples/datasets_io/benchmark_lazy_eager_loading.rst +0 -504
- braindecode-1.2.0/docs/auto_examples/datasets_io/index.rst +0 -191
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_benchmark_preprocessing.ipynb +0 -104
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_benchmark_preprocessing.rst +0 -257
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_bids_dataset_example.ipynb +0 -97
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_bids_dataset_example.rst +0 -110
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_custom_dataset_example.ipynb +0 -140
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_custom_dataset_example.rst +0 -163
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_load_save_datasets.ipynb +0 -176
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_load_save_datasets.rst +0 -202
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_mne_dataset_example.ipynb +0 -104
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_mne_dataset_example.rst +0 -135
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_moabb_dataset_example.ipynb +0 -140
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_moabb_dataset_example.rst +0 -144
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_split_dataset.ipynb +0 -180
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_split_dataset.rst +0 -223
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_tuh_discrete_multitarget.ipynb +0 -169
- braindecode-1.2.0/docs/auto_examples/datasets_io/plot_tuh_discrete_multitarget.rst +0 -232
- braindecode-1.2.0/docs/auto_examples/datasets_io/sg_execution_times.rst +0 -61
- braindecode-1.2.0/docs/auto_examples/index.rst +0 -575
- braindecode-1.2.0/docs/auto_examples/model_building/index.rst +0 -155
- braindecode-1.2.0/docs/auto_examples/model_building/plot_basic_training_epochs.ipynb +0 -219
- braindecode-1.2.0/docs/auto_examples/model_building/plot_basic_training_epochs.rst +0 -305
- braindecode-1.2.0/docs/auto_examples/model_building/plot_bcic_iv_2a_moabb_cropped.ipynb +0 -226
- braindecode-1.2.0/docs/auto_examples/model_building/plot_bcic_iv_2a_moabb_cropped.rst +0 -513
- braindecode-1.2.0/docs/auto_examples/model_building/plot_bcic_iv_2a_moabb_trial.ipynb +0 -253
- braindecode-1.2.0/docs/auto_examples/model_building/plot_bcic_iv_2a_moabb_trial.rst +0 -469
- braindecode-1.2.0/docs/auto_examples/model_building/plot_how_train_test_and_tune.ipynb +0 -375
- braindecode-1.2.0/docs/auto_examples/model_building/plot_how_train_test_and_tune.rst +0 -854
- braindecode-1.2.0/docs/auto_examples/model_building/plot_hyperparameter_tuning_with_scikit-learn.ipynb +0 -257
- braindecode-1.2.0/docs/auto_examples/model_building/plot_hyperparameter_tuning_with_scikit-learn.rst +0 -498
- braindecode-1.2.0/docs/auto_examples/model_building/plot_regression.ipynb +0 -212
- braindecode-1.2.0/docs/auto_examples/model_building/plot_regression.rst +0 -391
- braindecode-1.2.0/docs/auto_examples/model_building/plot_train_in_pure_pytorch_and_pytorch_lightning.ipynb +0 -250
- braindecode-1.2.0/docs/auto_examples/model_building/plot_train_in_pure_pytorch_and_pytorch_lightning.rst +0 -536
- braindecode-1.2.0/docs/auto_examples/model_building/sg_execution_times.rst +0 -55
- braindecode-1.2.0/docs/auto_examples/sg_execution_times.rst +0 -37
- braindecode-1.2.0/docs/generated/activation/braindecode.modules.LogActivation.rst +0 -130
- braindecode-1.2.0/docs/generated/activation/braindecode.modules.SafeLog.rst +0 -135
- braindecode-1.2.0/docs/generated/attention/braindecode.modules.CAT.rst +0 -130
- braindecode-1.2.0/docs/generated/attention/braindecode.modules.CATLite.rst +0 -130
- braindecode-1.2.0/docs/generated/attention/braindecode.modules.CBAM.rst +0 -130
- braindecode-1.2.0/docs/generated/attention/braindecode.modules.ECA.rst +0 -130
- braindecode-1.2.0/docs/generated/attention/braindecode.modules.EncNet.rst +0 -130
- braindecode-1.2.0/docs/generated/attention/braindecode.modules.FCA.rst +0 -137
- braindecode-1.2.0/docs/generated/attention/braindecode.modules.GCT.rst +0 -130
- braindecode-1.2.0/docs/generated/attention/braindecode.modules.GSoP.rst +0 -130
- braindecode-1.2.0/docs/generated/attention/braindecode.modules.GatherExcite.rst +0 -130
- braindecode-1.2.0/docs/generated/attention/braindecode.modules.MultiHeadAttention.rst +0 -130
- braindecode-1.2.0/docs/generated/attention/braindecode.modules.SRM.rst +0 -130
- braindecode-1.2.0/docs/generated/attention/braindecode.modules.SqueezeAndExcitation.rst +0 -130
- braindecode-1.2.0/docs/generated/blocks/braindecode.modules.FeedForwardBlock.rst +0 -127
- braindecode-1.2.0/docs/generated/blocks/braindecode.modules.InceptionBlock.rst +0 -130
- braindecode-1.2.0/docs/generated/blocks/braindecode.modules.MLP.rst +0 -127
- braindecode-1.2.0/docs/generated/braindecode.augmentation.AugmentedDataLoader.rst +0 -21
- braindecode-1.2.0/docs/generated/braindecode.augmentation.BandstopFilter.rst +0 -139
- braindecode-1.2.0/docs/generated/braindecode.augmentation.ChannelsDropout.rst +0 -139
- braindecode-1.2.0/docs/generated/braindecode.augmentation.ChannelsShuffle.rst +0 -139
- braindecode-1.2.0/docs/generated/braindecode.augmentation.ChannelsSymmetry.rst +0 -139
- braindecode-1.2.0/docs/generated/braindecode.augmentation.Compose.rst +0 -132
- braindecode-1.2.0/docs/generated/braindecode.augmentation.FTSurrogate.rst +0 -139
- braindecode-1.2.0/docs/generated/braindecode.augmentation.FrequencyShift.rst +0 -139
- braindecode-1.2.0/docs/generated/braindecode.augmentation.GaussianNoise.rst +0 -139
- braindecode-1.2.0/docs/generated/braindecode.augmentation.IdentityTransform.rst +0 -134
- braindecode-1.2.0/docs/generated/braindecode.augmentation.MaskEncoding.rst +0 -139
- braindecode-1.2.0/docs/generated/braindecode.augmentation.Mixup.rst +0 -139
- braindecode-1.2.0/docs/generated/braindecode.augmentation.SegmentationReconstruction.rst +0 -139
- braindecode-1.2.0/docs/generated/braindecode.augmentation.SensorsRotation.rst +0 -139
- braindecode-1.2.0/docs/generated/braindecode.augmentation.SensorsXRotation.rst +0 -123
- braindecode-1.2.0/docs/generated/braindecode.augmentation.SensorsYRotation.rst +0 -123
- braindecode-1.2.0/docs/generated/braindecode.augmentation.SensorsZRotation.rst +0 -123
- braindecode-1.2.0/docs/generated/braindecode.augmentation.SignFlip.rst +0 -134
- braindecode-1.2.0/docs/generated/braindecode.augmentation.SmoothTimeMask.rst +0 -139
- braindecode-1.2.0/docs/generated/braindecode.augmentation.TimeReverse.rst +0 -134
- braindecode-1.2.0/docs/generated/braindecode.augmentation.Transform.rst +0 -137
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.bandstop_filter.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.channels_dropout.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.channels_permute.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.channels_shuffle.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.frequency_shift.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.ft_surrogate.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.gaussian_noise.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.identity.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.mask_encoding.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.mixup.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.segmentation_reconstruction.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.sensors_rotation.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.sign_flip.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.smooth_time_mask.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.augmentation.functional.time_reverse.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.classifier.EEGClassifier.rst +0 -166
- braindecode-1.2.0/docs/generated/braindecode.datasets.BCICompetitionIVDataset4.rst +0 -42
- braindecode-1.2.0/docs/generated/braindecode.datasets.BIDSDataset.rst +0 -29
- braindecode-1.2.0/docs/generated/braindecode.datasets.BIDSEpochsDataset.rst +0 -29
- braindecode-1.2.0/docs/generated/braindecode.datasets.BNCI2014001.rst +0 -29
- braindecode-1.2.0/docs/generated/braindecode.datasets.BaseConcatDataset.rst +0 -55
- braindecode-1.2.0/docs/generated/braindecode.datasets.BaseDataset.rst +0 -32
- braindecode-1.2.0/docs/generated/braindecode.datasets.HGD.rst +0 -29
- braindecode-1.2.0/docs/generated/braindecode.datasets.MOABBDataset.rst +0 -29
- braindecode-1.2.0/docs/generated/braindecode.datasets.NMT.rst +0 -29
- braindecode-1.2.0/docs/generated/braindecode.datasets.SleepPhysionet.rst +0 -29
- braindecode-1.2.0/docs/generated/braindecode.datasets.SleepPhysionetChallenge2018.rst +0 -29
- braindecode-1.2.0/docs/generated/braindecode.datasets.TUH.rst +0 -29
- braindecode-1.2.0/docs/generated/braindecode.datasets.TUHAbnormal.rst +0 -29
- braindecode-1.2.0/docs/generated/braindecode.datasets.WindowsDataset.rst +0 -32
- braindecode-1.2.0/docs/generated/braindecode.datasets.create_from_X_y.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.datasets.create_from_mne_epochs.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.datasets.create_from_mne_raw.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.datautil.load_concat_dataset.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.datautil.save_concat_dataset.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.functional.drop_path.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.functional.glorot_weight_zero_bias.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.functional.hilbert_freq.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.functional.identity.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.functional.plv_time.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.functional.rescale_parameter.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.functional.safe_log.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.functional.square.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.models.ATCNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.AttentionBaseNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.AttnSleep.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.BDTCN.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.BIOT.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.CTNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.ContraWR.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.Deep4Net.rst +0 -133
- braindecode-1.2.0/docs/generated/braindecode.models.DeepSleepNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.EEGConformer.rst +0 -143
- braindecode-1.2.0/docs/generated/braindecode.models.EEGITNet.rst +0 -133
- braindecode-1.2.0/docs/generated/braindecode.models.EEGInceptionERP.rst +0 -133
- braindecode-1.2.0/docs/generated/braindecode.models.EEGInceptionMI.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.EEGMiner.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.EEGModuleMixin.rst +0 -53
- braindecode-1.2.0/docs/generated/braindecode.models.EEGNeX.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.EEGNet.rst +0 -133
- braindecode-1.2.0/docs/generated/braindecode.models.EEGSimpleConv.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.EEGTCNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.FBCNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.FBLightConvNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.FBMSNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.IFNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.Labram.rst +0 -171
- braindecode-1.2.0/docs/generated/braindecode.models.MSVTNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.SCCNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.SPARCNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.ShallowFBCSPNet.rst +0 -133
- braindecode-1.2.0/docs/generated/braindecode.models.SignalJEPA.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.SignalJEPA_Contextual.rst +0 -143
- braindecode-1.2.0/docs/generated/braindecode.models.SignalJEPA_PostLocal.rst +0 -143
- braindecode-1.2.0/docs/generated/braindecode.models.SignalJEPA_PreLocal.rst +0 -143
- braindecode-1.2.0/docs/generated/braindecode.models.SincShallowNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.SleepStagerBlanco2020.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.SleepStagerChambon2018.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.SyncNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.TIDNet.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.TSception.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.models.USleep.rst +0 -136
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.Crop.rst +0 -21
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.DropChannels.rst +0 -21
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.Filter.rst +0 -21
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.Pick.rst +0 -21
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.Preprocessor.rst +0 -32
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.Resample.rst +0 -21
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.SetEEGReference.rst +0 -21
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.create_fixed_length_windows.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.create_windows_from_events.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.create_windows_from_target_channels.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.exponential_moving_demean.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.exponential_moving_standardize.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.filterbank.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.preprocessing.preprocess.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.regressor.EEGRegressor.rst +0 -161
- braindecode-1.2.0/docs/generated/braindecode.samplers.BalancedSequenceSampler.rst +0 -36
- braindecode-1.2.0/docs/generated/braindecode.samplers.DistributedRecordingSampler.rst +0 -41
- braindecode-1.2.0/docs/generated/braindecode.samplers.DistributedRelativePositioningSampler.rst +0 -38
- braindecode-1.2.0/docs/generated/braindecode.samplers.RecordingSampler.rst +0 -39
- braindecode-1.2.0/docs/generated/braindecode.samplers.RelativePositioningSampler.rst +0 -36
- braindecode-1.2.0/docs/generated/braindecode.samplers.SequenceSampler.rst +0 -23
- braindecode-1.2.0/docs/generated/braindecode.training.CroppedLoss.rst +0 -130
- braindecode-1.2.0/docs/generated/braindecode.training.CroppedTimeSeriesEpochScoring.rst +0 -52
- braindecode-1.2.0/docs/generated/braindecode.training.CroppedTrialEpochScoring.rst +0 -57
- braindecode-1.2.0/docs/generated/braindecode.training.PostEpochTrainScoring.rst +0 -52
- braindecode-1.2.0/docs/generated/braindecode.training.TimeSeriesLoss.rst +0 -130
- braindecode-1.2.0/docs/generated/braindecode.training.mixup_criterion.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.training.predict_trials.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.training.trial_preds_from_window_preds.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.util.set_random_seeds.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.visualization.compute_amplitude_gradients.rst +0 -12
- braindecode-1.2.0/docs/generated/braindecode.visualization.plot_confusion_matrix.rst +0 -12
- braindecode-1.2.0/docs/generated/convolution/braindecode.modules.AvgPool2dWithConv.rst +0 -130
- braindecode-1.2.0/docs/generated/convolution/braindecode.modules.CausalConv1d.rst +0 -132
- braindecode-1.2.0/docs/generated/convolution/braindecode.modules.CombinedConv.rst +0 -130
- braindecode-1.2.0/docs/generated/convolution/braindecode.modules.Conv2dWithConstraint.rst +0 -121
- braindecode-1.2.0/docs/generated/convolution/braindecode.modules.DepthwiseConv2d.rst +0 -121
- braindecode-1.2.0/docs/generated/filter/braindecode.modules.FilterBankLayer.rst +0 -130
- braindecode-1.2.0/docs/generated/filter/braindecode.modules.GeneralizedGaussianFilter.rst +0 -144
- braindecode-1.2.0/docs/generated/layers/braindecode.modules.Chomp1d.rst +0 -135
- braindecode-1.2.0/docs/generated/layers/braindecode.modules.DropPath.rst +0 -135
- braindecode-1.2.0/docs/generated/layers/braindecode.modules.Ensure4d.rst +0 -130
- braindecode-1.2.0/docs/generated/layers/braindecode.modules.TimeDistributed.rst +0 -130
- braindecode-1.2.0/docs/generated/linear/braindecode.modules.LinearWithConstraint.rst +0 -121
- braindecode-1.2.0/docs/generated/linear/braindecode.modules.MaxNormLinear.rst +0 -121
- braindecode-1.2.0/docs/generated/stats/braindecode.modules.LogPowerLayer.rst +0 -6
- braindecode-1.2.0/docs/generated/stats/braindecode.modules.LogVarLayer.rst +0 -6
- braindecode-1.2.0/docs/generated/stats/braindecode.modules.MaxLayer.rst +0 -6
- braindecode-1.2.0/docs/generated/stats/braindecode.modules.MeanLayer.rst +0 -6
- braindecode-1.2.0/docs/generated/stats/braindecode.modules.StatLayer.rst +0 -130
- braindecode-1.2.0/docs/generated/stats/braindecode.modules.StdLayer.rst +0 -6
- braindecode-1.2.0/docs/generated/stats/braindecode.modules.VarLayer.rst +0 -6
- braindecode-1.2.0/docs/generated/util/braindecode.modules.aggregate_probas.rst +0 -12
- braindecode-1.2.0/docs/generated/wrapper/braindecode.modules.Expression.rst +0 -130
- braindecode-1.2.0/docs/generated/wrapper/braindecode.modules.IntermediateOutputWrapper.rst +0 -130
- braindecode-1.2.0/docs/models/categorization/attention.rst +0 -31
- braindecode-1.2.0/docs/models/categorization/channel.rst +0 -31
- braindecode-1.2.0/docs/models/categorization/convolution.rst +0 -33
- braindecode-1.2.0/docs/models/categorization/filterbank.rst +0 -31
- braindecode-1.2.0/docs/models/categorization/gnn.rst +0 -30
- braindecode-1.2.0/docs/models/categorization/interpretable.rst +0 -31
- braindecode-1.2.0/docs/models/categorization/llm.rst +0 -31
- braindecode-1.2.0/docs/models/categorization/recurrent.rst +0 -31
- braindecode-1.2.0/docs/models/categorization/spd.rst +0 -31
- braindecode-1.2.0/docs/models/models.rst +0 -78
- braindecode-1.2.0/docs/models/models_categorization.rst +0 -201
- braindecode-1.2.0/docs/models/models_table.rst +0 -191
- braindecode-1.2.0/docs/models/models_visualization.rst +0 -31
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/LICENSE.txt +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/MANIFEST.in +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/NOTICE.txt +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/README.rst +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/__init__.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/augmentation/__init__.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/augmentation/base.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/augmentation/functional.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/augmentation/transforms.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/classifier.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datasets/__init__.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datasets/base.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datasets/bbci.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datasets/bcicomp.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datasets/bids.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datasets/mne.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datasets/moabb.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datasets/nmt.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datasets/sleep_physionet.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datasets/tuh.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datasets/xy.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datautil/__init__.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datautil/serialization.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/datautil/util.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/eegneuralnet.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/functional/__init__.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/functional/functions.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/functional/initialization.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/base.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/biot.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/contrawr.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/eegitnet.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/eegminer.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/fbcnet.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/fblightconvnet.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/fbmsnet.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/hybrid.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/ifnet.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/labram.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/msvtnet.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/signal_jepa.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/sinc_shallow.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/syncnet.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/models/tcn.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/modules/__init__.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/modules/activation.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/modules/blocks.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/modules/layers.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/modules/linear.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/modules/parametrization.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/modules/stats.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/modules/util.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/modules/wrapper.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/preprocessing/__init__.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/preprocessing/mne_preprocess.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/preprocessing/preprocess.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/preprocessing/windowers.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/regressor.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/samplers/__init__.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/samplers/base.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/samplers/ssl.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/training/__init__.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/training/callbacks.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/training/losses.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/util.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/visualization/__init__.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode/visualization/confusion_matrices.py +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode.egg-info/dependency_links.txt +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/braindecode.egg-info/top_level.txt +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/docs/Makefile +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/docs/_templates/autosummary/class.rst +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/docs/_templates/autosummary/function.rst +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/docs/cite.rst +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/docs/help.rst +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/docs/install/install.rst +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/docs/install/install_pip.rst +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/docs/install/install_source.rst +0 -0
- {braindecode-1.2.0 → braindecode-1.2.0.dev169062562}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 1.2.0
|
|
3
|
+
Version: 1.2.0.dev169062562
|
|
4
4
|
Summary: Deep learning software to decode EEG, ECG or MEG signals
|
|
5
5
|
Author-email: Robin Tibor Schirrmeister <robintibor@gmail.com>
|
|
6
6
|
Maintainer-email: Alexandre Gramfort <agramfort@meta.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Robin Tibor Schirrmeister <robintibor@gmail.com>
|
|
@@ -17,7 +17,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
-
Requires-Python:
|
|
20
|
+
Requires-Python: >3.10
|
|
21
21
|
Description-Content-Type: text/x-rst
|
|
22
22
|
License-File: LICENSE.txt
|
|
23
23
|
License-File: NOTICE.txt
|
|
@@ -49,10 +49,6 @@ Requires-Dist: mypy; extra == "tests"
|
|
|
49
49
|
Provides-Extra: docs
|
|
50
50
|
Requires-Dist: sphinx_gallery; extra == "docs"
|
|
51
51
|
Requires-Dist: sphinx_rtd_theme; extra == "docs"
|
|
52
|
-
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
|
|
53
|
-
Requires-Dist: sphinx-autobuild; extra == "docs"
|
|
54
|
-
Requires-Dist: sphinxcontrib-bibtex; extra == "docs"
|
|
55
|
-
Requires-Dist: sphinx_sitemap; extra == "docs"
|
|
56
52
|
Requires-Dist: pydata_sphinx_theme; extra == "docs"
|
|
57
53
|
Requires-Dist: numpydoc; extra == "docs"
|
|
58
54
|
Requires-Dist: memory_profiler; extra == "docs"
|
|
@@ -63,7 +59,6 @@ Requires-Dist: lightning; extra == "docs"
|
|
|
63
59
|
Requires-Dist: seaborn; extra == "docs"
|
|
64
60
|
Requires-Dist: pre-commit; extra == "docs"
|
|
65
61
|
Requires-Dist: openneuro-py; extra == "docs"
|
|
66
|
-
Requires-Dist: plotly; extra == "docs"
|
|
67
62
|
Provides-Extra: all
|
|
68
63
|
Requires-Dist: braindecode[docs,moabb,tests]; extra == "all"
|
|
69
64
|
Dynamic: license-file
|
|
@@ -4,7 +4,6 @@ Some predefined network architectures for EEG decoding.
|
|
|
4
4
|
|
|
5
5
|
from .atcnet import ATCNet
|
|
6
6
|
from .attentionbasenet import AttentionBaseNet
|
|
7
|
-
from .attn_sleep import AttnSleep
|
|
8
7
|
from .base import EEGModuleMixin
|
|
9
8
|
from .biot import BIOT
|
|
10
9
|
from .contrawr import ContraWR
|
|
@@ -16,8 +15,9 @@ from .eeginception_erp import EEGInceptionERP
|
|
|
16
15
|
from .eeginception_mi import EEGInceptionMI
|
|
17
16
|
from .eegitnet import EEGITNet
|
|
18
17
|
from .eegminer import EEGMiner
|
|
19
|
-
from .eegnet import
|
|
18
|
+
from .eegnet import EEGNetv1, EEGNetv4
|
|
20
19
|
from .eegnex import EEGNeX
|
|
20
|
+
from .eegresnet import EEGResNet
|
|
21
21
|
from .eegsimpleconv import EEGSimpleConv
|
|
22
22
|
from .eegtcnet import EEGTCNet
|
|
23
23
|
from .fbcnet import FBCNet
|
|
@@ -38,11 +38,12 @@ from .signal_jepa import (
|
|
|
38
38
|
from .sinc_shallow import SincShallowNet
|
|
39
39
|
from .sleep_stager_blanco_2020 import SleepStagerBlanco2020
|
|
40
40
|
from .sleep_stager_chambon_2018 import SleepStagerChambon2018
|
|
41
|
+
from .sleep_stager_eldele_2021 import SleepStagerEldele2021
|
|
41
42
|
from .sparcnet import SPARCNet
|
|
42
43
|
from .syncnet import SyncNet
|
|
43
44
|
from .tcn import BDTCN, TCN
|
|
44
45
|
from .tidnet import TIDNet
|
|
45
|
-
from .tsinception import
|
|
46
|
+
from .tsinception import TSceptionV1
|
|
46
47
|
from .usleep import USleep
|
|
47
48
|
from .util import _init_models_dict, models_mandatory_parameters
|
|
48
49
|
|
|
@@ -52,7 +53,6 @@ _init_models_dict()
|
|
|
52
53
|
|
|
53
54
|
__all__ = [
|
|
54
55
|
"ATCNet",
|
|
55
|
-
"AttnSleep",
|
|
56
56
|
"AttentionBaseNet",
|
|
57
57
|
"EEGModuleMixin",
|
|
58
58
|
"BIOT",
|
|
@@ -65,9 +65,10 @@ __all__ = [
|
|
|
65
65
|
"EEGInceptionMI",
|
|
66
66
|
"EEGITNet",
|
|
67
67
|
"EEGMiner",
|
|
68
|
-
"
|
|
68
|
+
"EEGNetv1",
|
|
69
69
|
"EEGNetv4",
|
|
70
70
|
"EEGNeX",
|
|
71
|
+
"EEGResNet",
|
|
71
72
|
"EEGSimpleConv",
|
|
72
73
|
"EEGTCNet",
|
|
73
74
|
"FBCNet",
|
|
@@ -86,12 +87,13 @@ __all__ = [
|
|
|
86
87
|
"SincShallowNet",
|
|
87
88
|
"SleepStagerBlanco2020",
|
|
88
89
|
"SleepStagerChambon2018",
|
|
90
|
+
"SleepStagerEldele2021",
|
|
89
91
|
"SPARCNet",
|
|
90
92
|
"SyncNet",
|
|
91
93
|
"BDTCN",
|
|
92
94
|
"TCN",
|
|
93
95
|
"TIDNet",
|
|
94
|
-
"
|
|
96
|
+
"TSceptionV1",
|
|
95
97
|
"USleep",
|
|
96
98
|
"_init_models_dict",
|
|
97
99
|
"models_mandatory_parameters",
|
|
@@ -13,154 +13,13 @@ from braindecode.modules import CausalConv1d, Ensure4d, MaxNormLinear
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class ATCNet(EEGModuleMixin, nn.Module):
|
|
16
|
-
"""ATCNet from Altaheri et al. (2022) [1]_
|
|
16
|
+
"""ATCNet model from Altaheri et al. (2022) [1]_
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Pytorch implementation based on official tensorflow code [2]_.
|
|
19
19
|
|
|
20
20
|
.. figure:: https://user-images.githubusercontent.com/25565236/185449791-e8539453-d4fa-41e1-865a-2cf7e91f60ef.png
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
:width: 650px
|
|
24
|
-
|
|
25
|
-
.. rubric:: Architectural Overview
|
|
26
|
-
|
|
27
|
-
ATCNet is a *convolution-first* architecture augmented with a *lightweight attention–TCN*
|
|
28
|
-
sequence module. The end-to-end flow is:
|
|
29
|
-
|
|
30
|
-
- (i) :class:`_ConvBlock` learns temporal filter-banks and spatial projections (EEGNet-style),
|
|
31
|
-
downsampling time to a compact feature map;
|
|
32
|
-
|
|
33
|
-
- (ii) Sliding Windows carve overlapping temporal windows from this map;
|
|
34
|
-
|
|
35
|
-
- (iii) for each window, :class:`_AttentionBlock` applies small multi-head self-attention
|
|
36
|
-
over time, followed by a :class:`_TCNResidualBlock` stack (causal, dilated);
|
|
37
|
-
|
|
38
|
-
- (iv) window-level features are aggregated (mean of window logits or concatenation)
|
|
39
|
-
and mapped via a max-norm–constrained linear layer.
|
|
40
|
-
|
|
41
|
-
Relative to ViT, ATCNet replaces linear patch projection with learned *temporal–spatial*
|
|
42
|
-
convolutions; it processes *parallel* window encoders (attention→TCN) instead of a deep
|
|
43
|
-
stack; and swaps the MLP head for a TCN suited to 1-D EEG sequences.
|
|
44
|
-
|
|
45
|
-
.. rubric:: Macro Components
|
|
46
|
-
|
|
47
|
-
- :class:`_ConvBlock` **(Shallow conv stem → feature map)**
|
|
48
|
-
|
|
49
|
-
- *Operations.*
|
|
50
|
-
- **Temporal conv** (:class:`torch.nn.Conv2d`) with kernel ``(L_t, 1)`` builds a
|
|
51
|
-
FIR-like filter bank (``F1`` maps).
|
|
52
|
-
- **Depthwise spatial conv** (:class:`torch.nn.Conv2d`, ``groups=F1``) with kernel
|
|
53
|
-
``(1, n_chans)`` learns per-filter spatial projections (akin to EEGNet’s CSP-like step).
|
|
54
|
-
- **BN → ELU → AvgPool → Dropout** to stabilize and condense activations.
|
|
55
|
-
- **Refining temporal conv** (:class:`torch.nn.Conv2d`) with kernel ``(L_r, 1)`` +
|
|
56
|
-
**BN → ELU → AvgPool → Dropout**.
|
|
57
|
-
|
|
58
|
-
The output shape is ``(B, F2, T_c, 1)`` with ``F2 = F1·D`` and ``T_c = T/(P1·P2)``.
|
|
59
|
-
Temporal kernels behave as FIR filters; the depthwise-spatial conv yields frequency-specific
|
|
60
|
-
topographies. Pooling acts as a local integrator, reducing variance and imposing a
|
|
61
|
-
useful inductive bias on short EEG windows.
|
|
62
|
-
|
|
63
|
-
- **Sliding-Window Sequencer**
|
|
64
|
-
|
|
65
|
-
From the condensed time axis (length ``T_c``), ATCNet forms ``n`` overlapping windows
|
|
66
|
-
of width ``T_w = T_c - n + 1`` (one start per index). Each window produces a sequence
|
|
67
|
-
``(B, F2, T_w)`` forwarded to its own attention–TCN branch. This creates *parallel*
|
|
68
|
-
encoders over shifted contexts and is key to robustness on nonstationary EEG.
|
|
69
|
-
|
|
70
|
-
- :class:`_AttentionBlock` **(small MHA on temporal positions)**
|
|
71
|
-
|
|
72
|
-
- *Operations.*
|
|
73
|
-
- Rearrange to ``(B, T_w, F2)``,
|
|
74
|
-
- Normalization :class:`torch.nn.LayerNorm`
|
|
75
|
-
- Custom MultiHeadAttention :class:`_MHA` (``num_heads=H``, per-head dim ``d_h``) + residual add,
|
|
76
|
-
- Dropout :class:`torch.nn.Dropout`
|
|
77
|
-
- Rearrange back to ``(B, F2, T_w)``.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
**Note**: Attention is *local to a window* and purely temporal.
|
|
81
|
-
|
|
82
|
-
*Role.* Re-weights evidence across the window, letting the model emphasize informative
|
|
83
|
-
segments (onsets, bursts) before causal convolutions aggregate history.
|
|
84
|
-
|
|
85
|
-
- :class:`_TCNResidualBlock` **(causal dilated temporal CNN)**
|
|
86
|
-
|
|
87
|
-
- *Operations.*
|
|
88
|
-
- Two :class:`braindecode.modules.CausalConv1d` layers per block with dilation ``1, 2, 4, …``
|
|
89
|
-
- Across blocks of `torch.nn.ELU` + `torch.nn.BatchNorm1d` + `torch.nn.Dropout`) +
|
|
90
|
-
a residual (identity or 1x1 mapping).
|
|
91
|
-
- The final feature used per window is the *last* causal step ``[..., -1]`` (forecast-style).
|
|
92
|
-
|
|
93
|
-
*Role.* Efficient long-range temporal integration with stable gradients; the dilated
|
|
94
|
-
receptive field complements attention’s soft selection.
|
|
95
|
-
|
|
96
|
-
- **Aggregation & Classifier**
|
|
97
|
-
|
|
98
|
-
- *Operations.*
|
|
99
|
-
- Either (a) map each window feature ``(B, F2)`` to logits via :class:`braindecode.modules.MaxNormLinear`
|
|
100
|
-
and **average** across windows (default, matching official code), or
|
|
101
|
-
- (b) **concatenate** all window features ``(B, n·F2)`` and apply a single :class:`MaxNormLinear`.
|
|
102
|
-
The max-norm constraint regularizes the readout.
|
|
103
|
-
|
|
104
|
-
.. rubric:: Convolutional Details
|
|
105
|
-
|
|
106
|
-
- **Temporal.** Temporal structure is learned in three places:
|
|
107
|
-
- (1) the stem’s wide ``(L_t, 1)`` conv (learned filter bank),
|
|
108
|
-
- (2) the refining ``(L_r, 1)`` conv after pooling (short-term dynamics), and
|
|
109
|
-
- (3) the TCN’s causal 1-D convolutions with exponentially increasing dilation
|
|
110
|
-
(long-range dependencies). The minimum sequence length required by the TCN stack is
|
|
111
|
-
``(K_t - 1)·2^{L-1} + 1``; the implementation *auto-scales* kernels/pools/windows
|
|
112
|
-
when inputs are shorter to preserve feasibility.
|
|
113
|
-
|
|
114
|
-
- **Spatial.** A depthwise spatial conv spans the **full montage** (kernel ``(1, n_chans)``),
|
|
115
|
-
producing *per-temporal-filter* spatial projections (no cross-filter mixing at this step).
|
|
116
|
-
This mirrors EEGNet’s interpretability: each temporal filter has its own spatial pattern.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
.. rubric:: Attention / Sequential Modules
|
|
120
|
-
|
|
121
|
-
- **Type.** Multi-head self-attention with ``H`` heads and per-head dim ``d_h`` implemented
|
|
122
|
-
in :class:`_MHA`, allowing ``embed_dim = H·d_h`` independent of input and output dims.
|
|
123
|
-
- **Shapes.** ``(B, F2, T_w) → (B, T_w, F2) → (B, F2, T_w)``. Attention operates along
|
|
124
|
-
the **temporal** axis within a window; channels/features stay in the embedding dim ``F2``.
|
|
125
|
-
- **Role.** Highlights salient temporal positions prior to causal convolution; small attention
|
|
126
|
-
keeps compute modest while improving context modeling over pooled features.
|
|
127
|
-
|
|
128
|
-
.. rubric:: Additional Mechanisms
|
|
129
|
-
|
|
130
|
-
- **Parallel encoders over shifted windows.** Improves montage/phase robustness by
|
|
131
|
-
ensembling nearby contexts rather than committing to a single segmentation.
|
|
132
|
-
- **Max-norm classifier.** Enforces weight norm constraints at the readout, a common
|
|
133
|
-
stabilization trick in EEG decoding.
|
|
134
|
-
- **ViT vs. ATCNet (design choices).** Convolutional *nonlinear* projection rather than
|
|
135
|
-
linear patchification; attention followed by **TCN** (not MLP); *parallel* window
|
|
136
|
-
encoders rather than stacked encoders.
|
|
137
|
-
|
|
138
|
-
.. rubric:: Usage and Configuration
|
|
139
|
-
|
|
140
|
-
- ``conv_block_n_filters (F1)``, ``conv_block_depth_mult (D)`` → capacity of the stem
|
|
141
|
-
(with ``F2 = F1·D`` feeding attention/TCN), dimensions aligned to ``F2``, like :class:`EEGNet`.
|
|
142
|
-
- Pool sizes ``P1,P2`` trade temporal resolution for stability/compute; they set
|
|
143
|
-
``T_c = T/(P1·P2)`` and thus window width ``T_w``.
|
|
144
|
-
- ``n_windows`` controls the ensemble over shifts (compute ∝ windows).
|
|
145
|
-
- ``att_num_heads``, ``att_head_dim`` set attention capacity; keep ``H·d_h ≈ F2``.
|
|
146
|
-
- ``tcn_depth``, ``tcn_kernel_size`` govern receptive field; larger values demand
|
|
147
|
-
longer inputs (see minimum length above). The implementation warns and *rescales*
|
|
148
|
-
kernels/pools/windows if inputs are too short.
|
|
149
|
-
- **Aggregation choice.** ``concat=False`` (default, average of per-window logits) matches
|
|
150
|
-
the official code; ``concat=True`` mirrors the paper’s concatenation variant.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
Notes
|
|
154
|
-
-----
|
|
155
|
-
- Inputs substantially shorter than the implied minimum length trigger **automatic
|
|
156
|
-
downscaling** of kernels, pools, windows, and TCN kernel size to maintain validity.
|
|
157
|
-
- The attention–TCN sequence operates **per window**; the last causal step is used as the
|
|
158
|
-
window feature, aligning the temporal semantics across windows.
|
|
159
|
-
|
|
160
|
-
.. versionadded:: 1.1
|
|
161
|
-
|
|
162
|
-
- More detailed documentation of the model.
|
|
163
|
-
|
|
21
|
+
:align: center
|
|
22
|
+
:alt: ATCNet Architecture
|
|
164
23
|
|
|
165
24
|
Parameters
|
|
166
25
|
----------
|
|
@@ -226,13 +85,15 @@ class ATCNet(EEGModuleMixin, nn.Module):
|
|
|
226
85
|
Maximum L2-norm constraint imposed on weights of the last
|
|
227
86
|
fully-connected layer. Defaults to 0.25.
|
|
228
87
|
|
|
88
|
+
|
|
229
89
|
References
|
|
230
90
|
----------
|
|
231
|
-
.. [1] H. Altaheri, G. Muhammad
|
|
232
|
-
|
|
233
|
-
IEEE Transactions on Industrial Informatics
|
|
234
|
-
|
|
235
|
-
|
|
91
|
+
.. [1] H. Altaheri, G. Muhammad and M. Alsulaiman,
|
|
92
|
+
Physics-informed attention temporal convolutional network for EEG-based
|
|
93
|
+
motor imagery classification in IEEE Transactions on Industrial Informatics,
|
|
94
|
+
2022, doi: 10.1109/TII.2022.3197419.
|
|
95
|
+
.. [2] EEE-ATCNet implementation.
|
|
96
|
+
https://github.com/Altaheri/EEG-ATCNet/blob/main/models.py
|
|
236
97
|
"""
|
|
237
98
|
|
|
238
99
|
def __init__(
|
|
@@ -695,8 +556,7 @@ class _TCNResidualBlock(nn.Module):
|
|
|
695
556
|
# Reshape the input for the residual connection when necessary
|
|
696
557
|
if in_channels != n_filters:
|
|
697
558
|
self.reshaping_conv = nn.Conv1d(
|
|
698
|
-
|
|
699
|
-
out_channels=n_filters,
|
|
559
|
+
n_filters,
|
|
700
560
|
kernel_size=1,
|
|
701
561
|
padding="same",
|
|
702
562
|
)
|
|
@@ -26,150 +26,25 @@ from braindecode.modules.attention import (
|
|
|
26
26
|
class AttentionBaseNet(EEGModuleMixin, nn.Module):
|
|
27
27
|
"""AttentionBaseNet from Wimpff M et al. (2023) [Martin2023]_.
|
|
28
28
|
|
|
29
|
-
:bdg-success:`Convolution` :bdg-info:`Small Attention`
|
|
30
|
-
|
|
31
29
|
.. figure:: https://content.cld.iop.org/journals/1741-2552/21/3/036020/revision2/jnead48b9f2_hr.jpg
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
:width: 640px
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
.. rubric:: Architectural Overview
|
|
38
|
-
|
|
39
|
-
AttentionBaseNet is a *convolution-first* network with a *channel-attention* stage.
|
|
40
|
-
The end-to-end flow is:
|
|
41
|
-
|
|
42
|
-
- (i) :class:`_FeatureExtractor` learns a temporal filter bank and per-filter spatial
|
|
43
|
-
projections (depthwise across electrodes), then condenses time by pooling;
|
|
44
|
-
- (ii) **Channel Expansion** uses a ``1x1`` convolution to set the feature width;
|
|
45
|
-
- (iii) :class:`_ChannelAttentionBlock` refines features via depthwise–pointwise temporal
|
|
46
|
-
convs and an optional channel-attention module (SE/CBAM/ECA/…);
|
|
47
|
-
- (iv) **Classifier** flattens the sequence and applies a linear readout.
|
|
48
|
-
|
|
49
|
-
This design mirrors shallow CNN pipelines (EEGNet-style stem) but inserts a pluggable
|
|
50
|
-
attention unit that *re-weights channels* (and optionally temporal positions) before
|
|
51
|
-
classification.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
.. rubric:: Macro Components
|
|
55
|
-
|
|
56
|
-
- :class:`_FeatureExtractor` **(Shallow conv stem → condensed feature map)**
|
|
57
|
-
|
|
58
|
-
- *Operations.*
|
|
59
|
-
- **Temporal conv** (:class:`torch.nn.Conv2d`) with kernel ``(1, L_t)`` creates a learned
|
|
60
|
-
FIR-like filter bank with ``n_temporal_filters`` maps.
|
|
61
|
-
- **Depthwise spatial conv** (:class:`torch.nn.Conv2d`, ``groups=n_temporal_filters``)
|
|
62
|
-
with kernel ``(n_chans, 1)`` learns per-filter spatial projections over the full montage.
|
|
63
|
-
- **BatchNorm → ELU → AvgPool → Dropout** stabilize and downsample time.
|
|
64
|
-
- Output shape: ``(B, F2, 1, T₁)`` with ``F2 = n_temporal_filters x spatial_expansion``.
|
|
65
|
-
|
|
66
|
-
*Interpretability/robustness.* Temporal kernels behave as analyzable FIR filters; the
|
|
67
|
-
depthwise spatial step yields rhythm-specific topographies. Pooling acts as a local
|
|
68
|
-
integrator that reduces variance on short EEG windows.
|
|
69
|
-
|
|
70
|
-
- **Channel Expansion**
|
|
71
|
-
|
|
72
|
-
- *Operations.*
|
|
73
|
-
- A ``1x1`` conv → BN → activation maps ``F2 → ch_dim`` without changing
|
|
74
|
-
the temporal length ``T₁`` (shape: ``(B, ch_dim, 1, T₁)``).
|
|
75
|
-
This sets the embedding width for the attention block.
|
|
76
|
-
|
|
77
|
-
- :class:`_ChannelAttentionBlock` **(temporal refinement + channel attention)**
|
|
78
|
-
|
|
79
|
-
- *Operations.*
|
|
80
|
-
- **Depthwise temporal conv** ``(1, L_a)`` (groups=``ch_dim``) + **pointwise ``1x1``**,
|
|
81
|
-
BN and activation → preserves shape ``(B, ch_dim, 1, T₁)`` while refining timing.
|
|
82
|
-
- **Optional attention module** (see *Additional Mechanisms*) applies channel reweighting
|
|
83
|
-
(some variants also apply temporal gating).
|
|
84
|
-
- **AvgPool (1, P₂)** with stride ``(1, S₂)`` and **Dropout** → outputs
|
|
85
|
-
``(B, ch_dim, 1, T₂)``.
|
|
86
|
-
|
|
87
|
-
*Role.* Emphasizes informative channels (and, in certain modes, salient time steps)
|
|
88
|
-
before the classifier; complements the convolutional priors with adaptive re-weighting.
|
|
89
|
-
|
|
90
|
-
- **Classifier (aggregation + readout)**
|
|
91
|
-
|
|
92
|
-
*Operations.* :class:`torch.nn.Flatten` → :class:`torch.nn.Linear` from
|
|
93
|
-
``(B, ch_dim·T₂)`` to classes.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
.. rubric:: Convolutional Details
|
|
97
|
-
|
|
98
|
-
- **Temporal (where time-domain patterns are learned).**
|
|
99
|
-
Wide kernels in the stem (``(1, L_t)``) act as a learned filter bank for oscillatory
|
|
100
|
-
bands/transients; the attention block’s depthwise temporal conv (``(1, L_a)``) sharpens
|
|
101
|
-
short-term dynamics after downsampling. Pool sizes/strides (``P₁,S₁`` then ``P₂,S₂``)
|
|
102
|
-
set the token rate and effective temporal resolution.
|
|
103
|
-
|
|
104
|
-
- **Spatial (how electrodes are processed).**
|
|
105
|
-
A depthwise spatial conv with kernel ``(n_chans, 1)`` spans the full montage to
|
|
106
|
-
learn *per-temporal-filter* spatial projections (no cross-filter mixing at this step),
|
|
107
|
-
mirroring the interpretable spatial stage in shallow CNNs.
|
|
30
|
+
:align: center
|
|
31
|
+
:alt: Attention Base Net
|
|
108
32
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
channel attention (DCT-based) summarizes frequencies to drive channel weights.
|
|
33
|
+
Neural Network from the paper: EEG motor imagery decoding:
|
|
34
|
+
A framework for comparative analysis with channel attention
|
|
35
|
+
mechanisms
|
|
113
36
|
|
|
37
|
+
The paper and original code with more details about the methodological
|
|
38
|
+
choices are available at the [Martin2023]_ and [MartinCode]_.
|
|
114
39
|
|
|
115
|
-
|
|
40
|
+
The AttentionBaseNet architecture is composed of four modules:
|
|
41
|
+
- Input Block that performs a temporal convolution and a spatial
|
|
42
|
+
convolution.
|
|
43
|
+
- Channel Expansion that modifies the number of channels.
|
|
44
|
+
- An attention block that performs channel attention with several
|
|
45
|
+
options
|
|
46
|
+
- ClassificationHead
|
|
116
47
|
|
|
117
|
-
- **Type.** Channel attention chosen by ``attention_mode`` (SE, ECA, CBAM, CAT, GSoP,
|
|
118
|
-
EncNet, GE, GCT, SRM, CATLite). Most operate purely on channels; CBAM/CAT additionally
|
|
119
|
-
include temporal attention.
|
|
120
|
-
|
|
121
|
-
- **Shapes.** Input/Output around attention: ``(B, ch_dim, 1, T₁)``. Re-arrangements
|
|
122
|
-
(if any) are internal to the module; the block returns the same shape before pooling.
|
|
123
|
-
|
|
124
|
-
- **Role.** Re-weights channels (and optionally time) to highlight informative sources
|
|
125
|
-
and suppress distractors, improving SNR ahead of the linear head.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
.. rubric:: Additional Mechanisms
|
|
129
|
-
|
|
130
|
-
- **Attention variants at a glance.**
|
|
131
|
-
- ``"se"``: Squeeze-and-Excitation (global pooling → bottleneck → gates).
|
|
132
|
-
- ``"gsop"``: Global second-order pooling (covariance-aware channel weights).
|
|
133
|
-
- ``"fca"``: Frequency Channel Attention (DCT summary; uses ``seq_len`` and ``freq_idx``).
|
|
134
|
-
- ``"encnet"``: EncNet with learned codewords (uses ``n_codewords``).
|
|
135
|
-
- ``"eca"``: Efficient Channel Attention (local 1-D conv over channel descriptor; uses ``kernel_size``).
|
|
136
|
-
- ``"ge"``: Gather–Excite (context pooling with optional MLP; can use ``extra_params``).
|
|
137
|
-
- ``"gct"``: Gated Channel Transformation (global context normalization + gating).
|
|
138
|
-
- ``"srm"``: Style-based recalibration (mean–std descriptors; optional MLP).
|
|
139
|
-
- ``"cbam"``: Channel then temporal attention (uses ``kernel_size``).
|
|
140
|
-
- ``"cat"`` / ``"catlite"``: Collaborative (channel ± temporal) attention; *lite* omits temporal.
|
|
141
|
-
- **Auto-compatibility on short inputs.**
|
|
142
|
-
|
|
143
|
-
If the input duration is too short for the configured kernels/pools, the implementation
|
|
144
|
-
**automatically rescales** temporal lengths/strides downward (with a warning) to keep
|
|
145
|
-
shapes valid and preserve the pipeline semantics.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
.. rubric:: Usage and Configuration
|
|
149
|
-
|
|
150
|
-
- ``n_temporal_filters``, ``temporal_filter_length`` and ``spatial_expansion``:
|
|
151
|
-
control the capacity and the number of spatial projections in the stem.
|
|
152
|
-
- ``pool_length_inp``, ``pool_stride_inp`` then ``pool_length``, ``pool_stride``:
|
|
153
|
-
trade temporal resolution for compute; they determine the final sequence length ``T₂``.
|
|
154
|
-
- ``ch_dim``: width after the ``1x1`` expansion and the effective embedding size for attention.
|
|
155
|
-
- ``attention_mode`` + its specific hyperparameters (``reduction_rate``,
|
|
156
|
-
``kernel_size``, ``seq_len``, ``freq_idx``, ``n_codewords``, ``use_mlp``):
|
|
157
|
-
select and tune the reweighting mechanism.
|
|
158
|
-
- ``drop_prob_inp`` and ``drop_prob_attn``: regularize stem and attention stages.
|
|
159
|
-
- **Training tips.**
|
|
160
|
-
|
|
161
|
-
Start with moderate pooling (e.g., ``P₁=75,S₁=15``) and ELU activations; enable attention
|
|
162
|
-
only after the stem learns stable filters. For small datasets, prefer simpler modes
|
|
163
|
-
(``"se"``, ``"eca"``) before heavier ones (``"gsop"``, ``"encnet"``).
|
|
164
|
-
|
|
165
|
-
Notes
|
|
166
|
-
-----
|
|
167
|
-
- Sequence length after each stage is computed internally; the final classifier expects
|
|
168
|
-
a flattened ``ch_dim x T₂`` vector.
|
|
169
|
-
- Attention operates on *channel* dimension by design; temporal gating exists only in
|
|
170
|
-
specific variants (CBAM/CAT).
|
|
171
|
-
- The paper and original code with more details about the methodological
|
|
172
|
-
choices are available at the [Martin2023]_ and [MartinCode]_.
|
|
173
48
|
.. versionadded:: 0.9
|
|
174
49
|
|
|
175
50
|
Parameters
|
|
@@ -198,18 +73,18 @@ class AttentionBaseNet(EEGModuleMixin, nn.Module):
|
|
|
198
73
|
the depth of the network after the initial layer. Default is 16.
|
|
199
74
|
attention_mode : str, optional
|
|
200
75
|
The type of attention mechanism to apply. If `None`, no attention is applied.
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
76
|
+
- "se" for Squeeze-and-excitation network
|
|
77
|
+
- "gsop" for Global Second-Order Pooling
|
|
78
|
+
- "fca" for Frequency Channel Attention Network
|
|
79
|
+
- "encnet" for context encoding module
|
|
80
|
+
- "eca" for Efficient channel attention for deep convolutional neural networks
|
|
81
|
+
- "ge" for Gather-Excite
|
|
82
|
+
- "gct" for Gated Channel Transformation
|
|
83
|
+
- "srm" for Style-based Recalibration Module
|
|
84
|
+
- "cbam" for Convolutional Block Attention Module
|
|
85
|
+
- "cat" for Learning to collaborate channel and temporal attention
|
|
86
|
+
from multi-information fusion
|
|
87
|
+
- "catlite" for Learning to collaborate channel attention
|
|
213
88
|
from multi-information fusion (lite version, cat w/o temporal attention)
|
|
214
89
|
pool_length : int, default=8
|
|
215
90
|
The length of the window for the average pooling operation.
|
|
@@ -39,7 +39,7 @@ class CTNet(EEGModuleMixin, nn.Module):
|
|
|
39
39
|
The architecture consists of three main components:
|
|
40
40
|
|
|
41
41
|
1. **Convolutional Module**:
|
|
42
|
-
- Apply
|
|
42
|
+
- Apply EEGNetV4 to perform some feature extraction, denoted here as
|
|
43
43
|
_PatchEmbeddingEEGNet module.
|
|
44
44
|
|
|
45
45
|
2. **Transformer Encoder Module**:
|
|
@@ -19,13 +19,9 @@ from braindecode.modules import (
|
|
|
19
19
|
class Deep4Net(EEGModuleMixin, nn.Sequential):
|
|
20
20
|
"""Deep ConvNet model from Schirrmeister et al (2017) [Schirrmeister2017]_.
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
.. figure:: https://onlinelibrary.wiley.com/cms/asset/fc200ccc-d8c4-45b4-8577-56ce4d15999a/hbm23730-fig-0001-m.jpg
|
|
22
|
+
.. figure:: https://onlinelibrary.wiley.com/cms/asset/fc200ccc-d8c4-45b4-8577-56ce4d15999a/hbm23730-fig-0001-m.jpg
|
|
25
23
|
:align: center
|
|
26
|
-
:alt:
|
|
27
|
-
:width: 600px
|
|
28
|
-
|
|
24
|
+
:alt: CTNet Architecture
|
|
29
25
|
|
|
30
26
|
Model described in [Schirrmeister2017]_.
|
|
31
27
|
|
|
@@ -8,128 +8,14 @@ from braindecode.models.base import EEGModuleMixin
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class DeepSleepNet(EEGModuleMixin, nn.Module):
|
|
11
|
-
"""
|
|
11
|
+
"""Sleep staging architecture from Supratak et al. (2017) [Supratak2017]_.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
.. figure:: https://raw.githubusercontent.com/akaraspt/deepsleepnet/master/img/deepsleepnet.png
|
|
13
|
+
.. figure:: https://raw.githubusercontent.com/akaraspt/deepsleepnet/refs/heads/master/img/deepsleepnet.png
|
|
16
14
|
:align: center
|
|
17
15
|
:alt: DeepSleepNet Architecture
|
|
18
|
-
:width: 700px
|
|
19
|
-
|
|
20
|
-
.. rubric:: Architectural Overview
|
|
21
|
-
|
|
22
|
-
DeepSleepNet couples **dual-path convolution neural network representation learning** with
|
|
23
|
-
**sequence residual learning** via bidirectional LSTMs.
|
|
24
|
-
|
|
25
|
-
The network have:
|
|
26
|
-
|
|
27
|
-
- (i) learns complementary, time-frequency features from each
|
|
28
|
-
30-s epoch using **two parallel CNNs** (small vs. large first-layer filters), then
|
|
29
|
-
- (ii) models **temporal dependencies across epochs** using **two-layer BiLSTMs**
|
|
30
|
-
with a **residual shortcut** from the CNN features, and finally
|
|
31
|
-
- (iii) outputs per-epoch sleep stages. This design encodes both
|
|
32
|
-
epoch-local patterns and longer-range transition rules used by human scorers.
|
|
33
|
-
|
|
34
|
-
In term of implementation:
|
|
35
|
-
|
|
36
|
-
- (i) :class:`_RepresentationLearning` two CNNs extract epoch-wise features
|
|
37
|
-
(small-filter path for temporal precision; large-filter path for frequency precision);
|
|
38
|
-
- (ii) :class:`_SequenceResidualLearning` stacked BiLSTMs with peepholes + residual shortcut
|
|
39
|
-
inject temporal context while preserving CNN evidence;
|
|
40
|
-
- (iii) :class:`_Classifier` linear readout (softmax) for the five sleep stages.
|
|
41
|
-
|
|
42
|
-
.. rubric:: Macro Components
|
|
43
|
-
|
|
44
|
-
- :class:`_RepresentationLearning` **(dual-path CNN → epoch feature)**
|
|
45
|
-
|
|
46
|
-
- *Operations.*
|
|
47
|
-
- **Small-filter CNN** 4 times:
|
|
48
|
-
- :class:`~torch.nn.Conv1d`
|
|
49
|
-
- :class:`~torch.nn.BatchNorm1d`
|
|
50
|
-
- :class:`~torch.nn.ReLU`
|
|
51
|
-
- :class:`~torch.nn.MaxPool1d` after.
|
|
52
|
-
First conv uses **filter length ≈ Fs/2** and **stride ≈ Fs/16** to emphasize *timing* of graphoelements.
|
|
53
|
-
- **Large-filter CNN**:
|
|
54
|
-
- Same stack but first conv uses **filter length ≈ 4·Fs** and
|
|
55
|
-
- **stride ≈ Fs/2** to emphasize *frequency* content.
|
|
56
|
-
- Outputs from both paths are **concatenated** into the epoch embedding ``a_t``.
|
|
57
|
-
|
|
58
|
-
- *Rationale.*
|
|
59
|
-
Two first-layer scales provide a **learned, dual-scale filter bank** that trades
|
|
60
|
-
temporal vs. frequency precision without hand-crafted features.
|
|
61
|
-
|
|
62
|
-
- :class:`_SequenceResidualLearning` (:class:`~torch.nn.BiLSTM` **context + residual fusion)**
|
|
63
|
-
|
|
64
|
-
- *Operations.*
|
|
65
|
-
- **Two-layer BiLSTM** with **peephole connections** processes the sequence of epoch embeddings
|
|
66
|
-
``{a_t}`` forward and backward; hidden states from both directions are **concatenated**.
|
|
67
|
-
- A **shortcut MLP** (fully connected + :class:`~torch.nn.BatchNorm1d` + :class:`~torch.nn.ReLU`) projects ``a_t`` to the BiLSTM output
|
|
68
|
-
dimension and is **added** (residual) to the :class:`~torch.nn.BiLSTM` output at each time step.
|
|
69
|
-
- *Role.* Encodes **stage-transition rules** and smooths predictions over time while preserving
|
|
70
|
-
salient CNN features via the residual path.
|
|
71
|
-
|
|
72
|
-
- :class:`_Classifier` **(epoch-wise prediction)**
|
|
73
|
-
|
|
74
|
-
- *Operations.*
|
|
75
|
-
- :class:`~torch.nn.Linear` to produce per-epoch class probabilities.
|
|
76
16
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
.. rubric:: Convolutional Details
|
|
81
|
-
|
|
82
|
-
- **Temporal (where time-domain patterns are learned).**
|
|
83
|
-
|
|
84
|
-
Both CNN paths use **1-D temporal convolutions**. The *small-filter* path (first kernel ≈ Fs/2,
|
|
85
|
-
stride ≈ Fs/16) captures *when* characteristic transients occur; the *large-filter* path
|
|
86
|
-
(first kernel ≈ 4·Fs, stride ≈ Fs/2) captures *which* frequency components dominate over the
|
|
87
|
-
epoch. Deeper layers use **small kernels** to refine features with fewer parameters, interleaved
|
|
88
|
-
with **max pooling** for downsampling.
|
|
89
|
-
|
|
90
|
-
- **Spatial (how channels are processed).**
|
|
91
|
-
The original model operates on **single-channel** raw EEG; convolutions therefore mix only
|
|
92
|
-
along time (no spatial convolution across electrodes).
|
|
93
|
-
|
|
94
|
-
- **Spectral (how frequency information emerges).**
|
|
95
|
-
No explicit Fourier/wavelet transform is used. The **large-filter path** serves as a
|
|
96
|
-
*frequency-sensitive* analyzer, while the **small-filter path** remains *time-sensitive*,
|
|
97
|
-
together functioning as a **two-band learned filter bank** at the first layer.
|
|
98
|
-
|
|
99
|
-
.. rubric:: Attention / Sequential Modules
|
|
100
|
-
|
|
101
|
-
- **Type.** **Bidirectional LSTM** (two layers) with **peephole connections**; forward and
|
|
102
|
-
backward streams are independent and concatenated.
|
|
103
|
-
- **Shapes.** For a sequence of ``N`` epochs, the CNN produces ``{a_t} ∈ R^{D}``;
|
|
104
|
-
BiLSTM outputs ``h_t ∈ R^{2H}``; the shortcut MLP maps ``a_t → R^{2H}`` to enable
|
|
105
|
-
**element-wise residual addition**.
|
|
106
|
-
- **Role.** Models **long-range temporal dependencies** (e.g., persisting N2 without visible
|
|
107
|
-
K-complex/spindles), stabilizing per-epoch predictions.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
.. rubric:: Additional Mechanisms
|
|
111
|
-
|
|
112
|
-
- **Residual shortcut over sequence encoder.** Adds projected CNN features to BiLSTM outputs,
|
|
113
|
-
improving gradient flow and retaining discriminative content from representation learning.
|
|
114
|
-
- **Two-step training.**
|
|
115
|
-
- (i) **Pretrain** the CNN paths with class-balanced sampling;
|
|
116
|
-
- (ii) **fine-tune** the full network with sequential batches, using **lower LR** for CNNs and **higher LR** for the
|
|
117
|
-
sequence encoder.
|
|
118
|
-
- **State handling.** BiLSTM states are **reinitialized per subject** so that temporal context
|
|
119
|
-
does not leak across recordings.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
.. rubric:: Usage and Configuration
|
|
123
|
-
|
|
124
|
-
- **Epoch pipeline.** Use **two parallel CNNs** with the first conv sized to **Fs/2** (small path)
|
|
125
|
-
and **4·Fs** (large path), with strides **Fs/16** and **Fs/2**, respectively; stack three more
|
|
126
|
-
conv blocks with small kernels, plus **max pooling** in each path. Concatenate path outputs
|
|
127
|
-
to form epoch embeddings.
|
|
128
|
-
- **Sequence encoder.** Apply **two-layer BiLSTM (peepholes)** over the sequence of embeddings;
|
|
129
|
-
add a **projection MLP** on the CNN features and **sum** with BiLSTM outputs (residual).
|
|
130
|
-
Finish with :class:`~torch.nn.Linear` per epoch.
|
|
131
|
-
- **Reference implementation.** See the official repository for a faithful implementation and
|
|
132
|
-
training scripts.
|
|
17
|
+
Convolutional neural network and bidirectional-Long Short-Term
|
|
18
|
+
for single channels sleep staging described in [Supratak2017]_.
|
|
133
19
|
|
|
134
20
|
Parameters
|
|
135
21
|
----------
|
|
@@ -146,6 +32,7 @@ class DeepSleepNet(EEGModuleMixin, nn.Module):
|
|
|
146
32
|
drop_prob : float, default=0.5
|
|
147
33
|
The dropout rate for regularization. Values should be between 0 and 1.
|
|
148
34
|
|
|
35
|
+
|
|
149
36
|
References
|
|
150
37
|
----------
|
|
151
38
|
.. [Supratak2017] Supratak, A., Dong, H., Wu, C., & Guo, Y. (2017).
|