Braindecode 1.5.2__tar.gz → 1.6.0.dev1024__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.5.2/braindecode.egg-info → braindecode-1.6.0.dev1024}/PKG-INFO +1 -1
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/bids/hub.py +0 -5
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/contrawr.py +0 -2
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/deepsleepnet.py +0 -2
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/eegminer.py +0 -2
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/eegsym.py +0 -2
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/usleep.py +0 -2
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/util.py +0 -34
- braindecode-1.6.0.dev1024/braindecode/version.py +1 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024/braindecode.egg-info}/PKG-INFO +1 -1
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/whats_new.rst +3 -21
- braindecode-1.5.2/braindecode/version.py +0 -1
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/LICENSE.txt +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/MANIFEST.in +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/NOTICE.txt +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/README.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/__init__.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/augmentation/__init__.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/augmentation/base.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/augmentation/functional.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/augmentation/transforms.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/classifier.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/__init__.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/base.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/bbci.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/bcicomp.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/bids/__init__.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/bids/datasets.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/bids/format.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/bids/hub_format.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/bids/hub_io.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/bids/hub_validation.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/bids/iterable.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/chb_mit.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/mne.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/moabb.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/nmt.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/registry.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/siena.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/sleep_physionet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/tuh.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/utils.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/xy.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datautil/__init__.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datautil/channel_utils.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datautil/hub_formats.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datautil/serialization.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datautil/util.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/eegneuralnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/functional/__init__.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/functional/functions.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/functional/initialization.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/__init__.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/atcnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/attentionbasenet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/attn_sleep.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/base.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/bendr.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/biot.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/brainmodule.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/cbramod.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/codebrain.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/config.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/ctnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/deep4.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/dgcnn.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/eegconformer.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/eeginception_erp.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/eeginception_mi.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/eegitnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/eegnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/eegnex.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/eegpt.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/eegsimpleconv.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/eegtcnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/emg2qwerty.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/fbcnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/fblightconvnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/fbmsnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/hybrid.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/ifnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/interpolated.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/labram.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/luna.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/medformer.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/meta_neuromotor.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/msvtnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/patchedtransformer.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/reve.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/sccnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/shallow_fbcsp.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/signal_jepa.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/sinc_shallow.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/sparcnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/sstdpn.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/summary.csv +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/syncnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/tcn.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/tidnet.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/tsinception.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/modules/__init__.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/modules/activation.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/modules/attention.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/modules/blocks.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/modules/convolution.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/modules/filter.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/modules/interpolation.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/modules/layers.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/modules/linear.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/modules/parametrization.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/modules/stats.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/modules/util.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/modules/wrapper.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/preprocessing/__init__.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/preprocessing/mne_preprocess.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/preprocessing/preprocess.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/preprocessing/util.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/preprocessing/windowers.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/regressor.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/samplers/__init__.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/samplers/base.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/samplers/ssl.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/training/__init__.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/training/callbacks.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/training/losses.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/training/scoring.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/util.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/visualization/__init__.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/visualization/attribution.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/visualization/confusion_matrices.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/visualization/frequency.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/visualization/metrics.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/visualization/sanity.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/visualization/topology.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode.egg-info/SOURCES.txt +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode.egg-info/dependency_links.txt +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode.egg-info/requires.txt +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode.egg-info/top_level.txt +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/Makefile +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/_templates/autosummary/class.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/_templates/autosummary/class_in_subdir.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/_templates/autosummary/function.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/_templates/autosummary/function_in_subdir.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/api.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/cite.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/conf.py +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/help.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/index.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/install/install.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/install/install_pip.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/install/install_source.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/categorization/attention.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/categorization/channel.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/categorization/convolution.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/categorization/filterbank.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/categorization/gnn.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/categorization/interpretable.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/categorization/lbm.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/categorization/recurrent.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/categorization/spd.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/models.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/models_categorization.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/models_table.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/models_visualization.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/sg_execution_times.rst +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/pyproject.toml +0 -0
- {braindecode-1.5.2 → braindecode-1.6.0.dev1024}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0.dev1024
|
|
4
4
|
Summary: Deep learning software to decode EEG, ECG or MEG signals
|
|
5
5
|
Author-email: Robin Tibor Schirrmeister <robintibor@gmail.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Alexandre Gramfort <agramfort@meta.com>
|
|
6
6
|
Maintainer-email: Alexandre Gramfort <agramfort@meta.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Robin Tibor Schirrmeister <robintibor@gmail.com>
|
|
@@ -466,7 +466,6 @@ class HubDatasetMixin:
|
|
|
466
466
|
token: Optional[str] = None,
|
|
467
467
|
cache_dir: Optional[Union[str, Path]] = None,
|
|
468
468
|
force_download: bool = False,
|
|
469
|
-
revision: str | None = None,
|
|
470
469
|
**kwargs,
|
|
471
470
|
):
|
|
472
471
|
"""
|
|
@@ -486,9 +485,6 @@ class HubDatasetMixin:
|
|
|
486
485
|
cache directory (~/.cache/huggingface/datasets).
|
|
487
486
|
force_download : bool, default=False
|
|
488
487
|
Whether to force re-download even if cached.
|
|
489
|
-
revision : str | None, default=None
|
|
490
|
-
Specific branch, tag, or commit to download. If None, uses the
|
|
491
|
-
repository's default revision.
|
|
492
488
|
**kwargs
|
|
493
489
|
Additional arguments (currently unused).
|
|
494
490
|
|
|
@@ -530,7 +526,6 @@ class HubDatasetMixin:
|
|
|
530
526
|
token=token,
|
|
531
527
|
cache_dir=cache_dir,
|
|
532
528
|
force_download=force_download,
|
|
533
|
-
revision=revision,
|
|
534
529
|
)
|
|
535
530
|
|
|
536
531
|
# Load format info
|
|
@@ -5,7 +5,6 @@ import torch.nn as nn
|
|
|
5
5
|
from mne.utils import warn
|
|
6
6
|
|
|
7
7
|
from braindecode.models.base import EEGModuleMixin
|
|
8
|
-
from braindecode.models.util import _disable_batch_norm_training_if_batch_size_one
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class ContraWR(EEGModuleMixin, nn.Module):
|
|
@@ -123,7 +122,6 @@ class ContraWR(EEGModuleMixin, nn.Module):
|
|
|
123
122
|
self.activation_layer = activation()
|
|
124
123
|
self.final_layer = nn.Linear(emb_size, self.n_outputs)
|
|
125
124
|
|
|
126
|
-
@_disable_batch_norm_training_if_batch_size_one
|
|
127
125
|
def forward(self, X: torch.Tensor) -> torch.Tensor:
|
|
128
126
|
"""
|
|
129
127
|
Forward pass.
|
|
@@ -7,7 +7,6 @@ import torch.nn as nn
|
|
|
7
7
|
from einops.layers.torch import Rearrange
|
|
8
8
|
|
|
9
9
|
from braindecode.models.base import EEGModuleMixin
|
|
10
|
-
from braindecode.models.util import _disable_batch_norm_training_if_batch_size_one
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
class DeepSleepNet(EEGModuleMixin, nn.Module):
|
|
@@ -290,7 +289,6 @@ class DeepSleepNet(EEGModuleMixin, nn.Module):
|
|
|
290
289
|
else nn.Linear(fc_out_features, self.n_outputs)
|
|
291
290
|
)
|
|
292
291
|
|
|
293
|
-
@_disable_batch_norm_training_if_batch_size_one
|
|
294
292
|
def forward(self, x):
|
|
295
293
|
if x.ndim == 3:
|
|
296
294
|
x = x.unsqueeze(1)
|
|
@@ -13,7 +13,6 @@ from torch import nn
|
|
|
13
13
|
|
|
14
14
|
import braindecode.functional as F
|
|
15
15
|
from braindecode.models.base import EEGModuleMixin
|
|
16
|
-
from braindecode.models.util import _disable_batch_norm_training_if_batch_size_one
|
|
17
16
|
from braindecode.modules import GeneralizedGaussianFilter
|
|
18
17
|
|
|
19
18
|
_eeg_miner_methods = ["mag", "corr", "plv"]
|
|
@@ -192,7 +191,6 @@ class EEGMiner(EEGModuleMixin, nn.Module):
|
|
|
192
191
|
self.final_layer = nn.Linear(self.n_features, self.n_outputs)
|
|
193
192
|
nn.init.zeros_(self.final_layer.bias)
|
|
194
193
|
|
|
195
|
-
@_disable_batch_norm_training_if_batch_size_one
|
|
196
194
|
def forward(self, x):
|
|
197
195
|
"""x: (batch, electrodes, time)"""
|
|
198
196
|
batch = x.shape[0]
|
|
@@ -11,7 +11,6 @@ from braindecode.datautil.channel_utils import (
|
|
|
11
11
|
match_hemisphere_chans,
|
|
12
12
|
)
|
|
13
13
|
from braindecode.models.base import EEGModuleMixin
|
|
14
|
-
from braindecode.models.util import _disable_batch_norm_training_if_batch_size_one
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
class EEGSym(EEGModuleMixin, nn.Module):
|
|
@@ -364,7 +363,6 @@ class EEGSym(EEGModuleMixin, nn.Module):
|
|
|
364
363
|
out_features=self.n_outputs,
|
|
365
364
|
)
|
|
366
365
|
|
|
367
|
-
@_disable_batch_norm_training_if_batch_size_one
|
|
368
366
|
def forward(self, x):
|
|
369
367
|
"""Forward pass.
|
|
370
368
|
|
|
@@ -9,7 +9,6 @@ import torch
|
|
|
9
9
|
from torch import nn
|
|
10
10
|
|
|
11
11
|
from braindecode.models.base import EEGModuleMixin
|
|
12
|
-
from braindecode.models.util import _disable_batch_norm_training_if_batch_size_one
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
class USleep(EEGModuleMixin, nn.Module):
|
|
@@ -296,7 +295,6 @@ class USleep(EEGModuleMixin, nn.Module):
|
|
|
296
295
|
# output is (B, n_classes, S)
|
|
297
296
|
)
|
|
298
297
|
|
|
299
|
-
@_disable_batch_norm_training_if_batch_size_one
|
|
300
298
|
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
|
301
299
|
"""If input x has shape (B, S, C, T), return y_pred of shape (B, n_classes, S).
|
|
302
300
|
If input x has shape (B, C, T), return y_pred of shape (B, n_classes).
|
|
@@ -12,8 +12,6 @@ from typing import Any, Dict, Literal, Optional, Sequence
|
|
|
12
12
|
import numpy as np
|
|
13
13
|
import pandas as pd
|
|
14
14
|
import pydantic
|
|
15
|
-
import torch # noqa: F401 # exposed so TorchScript can resolve ``torch`` through the BatchNorm-guard wrapper's __globals__
|
|
16
|
-
from torch import nn
|
|
17
15
|
|
|
18
16
|
models_dict = {}
|
|
19
17
|
|
|
@@ -25,38 +23,6 @@ _EEG_PARAMS = frozenset(
|
|
|
25
23
|
)
|
|
26
24
|
|
|
27
25
|
_JSON_SAFE = (int, float, str, bool, type(None))
|
|
28
|
-
_BATCH_NORM_MODULES = (
|
|
29
|
-
nn.BatchNorm1d,
|
|
30
|
-
nn.BatchNorm2d,
|
|
31
|
-
nn.BatchNorm3d,
|
|
32
|
-
nn.SyncBatchNorm,
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
def _disable_batch_norm_training_if_batch_size_one(forward):
|
|
37
|
-
"""Temporarily set BatchNorm layers to train(False) for batch size one."""
|
|
38
|
-
forward_signature = inspect.signature(forward)
|
|
39
|
-
|
|
40
|
-
@wraps(forward)
|
|
41
|
-
def wrapped(self, *args, **kwargs):
|
|
42
|
-
bound = forward_signature.bind(self, *args, **kwargs)
|
|
43
|
-
x = next(value for name, value in bound.arguments.items() if name != "self")
|
|
44
|
-
batch_norms = []
|
|
45
|
-
if self.training and x.shape[0] == 1:
|
|
46
|
-
batch_norms = [
|
|
47
|
-
layer
|
|
48
|
-
for layer in self.modules()
|
|
49
|
-
if isinstance(layer, _BATCH_NORM_MODULES) and layer.training
|
|
50
|
-
]
|
|
51
|
-
for batch_norm in batch_norms:
|
|
52
|
-
batch_norm.train(False)
|
|
53
|
-
try:
|
|
54
|
-
return forward(self, *args, **kwargs)
|
|
55
|
-
finally:
|
|
56
|
-
for batch_norm in batch_norms:
|
|
57
|
-
batch_norm.train(True)
|
|
58
|
-
|
|
59
|
-
return wrapped
|
|
60
26
|
|
|
61
27
|
|
|
62
28
|
def _is_jsonable(val):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.6.0.dev1024"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0.dev1024
|
|
4
4
|
Summary: Deep learning software to decode EEG, ECG or MEG signals
|
|
5
5
|
Author-email: Robin Tibor Schirrmeister <robintibor@gmail.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Alexandre Gramfort <agramfort@meta.com>
|
|
6
6
|
Maintainer-email: Alexandre Gramfort <agramfort@meta.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Robin Tibor Schirrmeister <robintibor@gmail.com>
|
|
@@ -22,17 +22,12 @@
|
|
|
22
22
|
.. _current:
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
Current 1.
|
|
25
|
+
Current 1.6.0 (GitHub)
|
|
26
26
|
===============================
|
|
27
27
|
|
|
28
28
|
Enhancements
|
|
29
29
|
============
|
|
30
30
|
|
|
31
|
-
- Add a ``revision`` keyword argument to
|
|
32
|
-
:meth:`braindecode.datasets.BaseConcatDataset.pull_from_hub` so callers can
|
|
33
|
-
pin dataset downloads to a specific branch, tag, or commit on the Hugging
|
|
34
|
-
Face Hub.
|
|
35
|
-
|
|
36
31
|
API and behavior changes
|
|
37
32
|
========================
|
|
38
33
|
|
|
@@ -46,25 +41,12 @@ Requirements
|
|
|
46
41
|
Bug fixes
|
|
47
42
|
==========
|
|
48
43
|
|
|
49
|
-
-
|
|
50
|
-
:class:`~braindecode.models.DeepSleepNet`, and
|
|
51
|
-
:class:`~braindecode.models.EEGMiner` raising a confusing
|
|
52
|
-
:class:`ValueError` on ``batch_size=1`` forward passes in train mode due to
|
|
53
|
-
:class:`~torch.nn.BatchNorm1d` (and its 2D/3D variants) requiring more than
|
|
54
|
-
one sample per channel during training. The affected BatchNorm layers now
|
|
55
|
-
use running statistics when ``batch_size == 1`` in train mode.
|
|
56
|
-
By `Bruno Aristimunha`_.
|
|
44
|
+
- None yet
|
|
57
45
|
|
|
58
46
|
Code health
|
|
59
47
|
============
|
|
60
48
|
|
|
61
|
-
-
|
|
62
|
-
the 1st of every month, complementing the existing per-push ``.devN``
|
|
63
|
-
pipeline. (:gh:`1030` by `Bruno Aristimunha`_)
|
|
64
|
-
|
|
65
|
-
- Make the monthly release workflow push only the release tag and open a
|
|
66
|
-
pull request for the version bump, so it never needs to push to the
|
|
67
|
-
protected ``master`` branch. (:gh:`1031` by `Bruno Aristimunha`_)
|
|
49
|
+
- None yet
|
|
68
50
|
|
|
69
51
|
|
|
70
52
|
Current 1.5.1 (stable)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.5.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/datasets/sleep_physio_challe_18.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/sleep_stager_blanco_2020.py
RENAMED
|
File without changes
|
{braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/models/sleep_stager_chambon_2018.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/preprocessing/eegprep_preprocess.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.5.2 → braindecode-1.6.0.dev1024}/braindecode/visualization/confusion_matrices.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/_templates/autosummary/class_in_subdir.rst
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/_templates/autosummary/function_in_subdir.rst
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.5.2 → braindecode-1.6.0.dev1024}/docs/models/categorization/interpretable.rst
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|