braindecode 1.8.1.dev181847394__tar.gz → 1.8.1.dev183849953__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.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/NOTICE.txt +1 -0
- {braindecode-1.8.1.dev181847394/braindecode.egg-info → braindecode-1.8.1.dev183849953}/PKG-INFO +1 -1
- braindecode-1.8.1.dev183849953/braindecode/functional/_real_dft.py +138 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/functional/functions.py +14 -1
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/__init__.py +2 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/base.py +25 -2
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/bendr.py +2 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/biot.py +1 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/cbramod.py +3 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eegdino.py +2 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eegpt.py +1 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/labram.py +1 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/meta_neuromotor.py +1 -0
- braindecode-1.8.1.dev183849953/braindecode/models/mscformer.py +502 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/mvpformer.py +13 -6
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/reve.py +7 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/signal_jepa.py +30 -11
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/steegformer.py +1 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/summary.csv +1 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/util.py +1 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/zuna.py +18 -5
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/filter.py +25 -0
- braindecode-1.8.1.dev183849953/braindecode/version.py +1 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953/braindecode.egg-info}/PKG-INFO +1 -1
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode.egg-info/SOURCES.txt +2 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/api.rst +1 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/whats_new.rst +61 -0
- braindecode-1.8.1.dev181847394/braindecode/version.py +0 -1
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/LICENSE.txt +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/MANIFEST.in +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/README.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/__init__.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/augmentation/__init__.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/augmentation/base.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/augmentation/functional.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/augmentation/transforms.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/classifier.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/__init__.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/_notebook_viewer.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/base.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/bbci.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/bcicomp.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/bids/__init__.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/bids/datasets.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/bids/format.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/bids/hub.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/bids/hub_format.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/bids/hub_io.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/bids/hub_validation.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/bids/iterable.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/chb_mit.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/collate.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/mne.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/moabb.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/nmt.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/registry.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/siena.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/sleep_physionet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/tuh.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/utils.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datasets/xy.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datautil/__init__.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datautil/channel_utils.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datautil/hub_formats.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datautil/serialization.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/datautil/util.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/eegneuralnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/functional/__init__.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/functional/initialization.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/atcnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/attentionbasenet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/attn_sleep.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/barista.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/brainbert.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/brainmodule.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/brant.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/codebrain.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/config.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/contrawr.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/ctnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/dance.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/deep4.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/deepsleepnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/dgcnn.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eegconformer.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eeginception_erp.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eeginception_mi.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eegitnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eegminer.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eegnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eegnex.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eegsimpleconv.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eegsym.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eegtcnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/emg2qwerty.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/fbcnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/fblightconvnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/fbmsnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/hybrid.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/ifnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/interpolated.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/luna.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/medformer.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/mirepnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/msvtnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/neuropose.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/patchedtransformer.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/sccnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/sensingdynamics.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/shallow_fbcsp.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/sinc_shallow.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/sparcnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/sstdpn.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/syncnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/tcformer.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/tcn.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/tidnet.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/tsinception.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/usleep.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/vemg2pose.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/__init__.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/activation.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/attention.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/blocks.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/convolution.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/dance_modules.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/interpolation.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/layers.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/linear.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/parametrization.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/stats.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/util.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/modules/wrapper.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/preprocessing/__init__.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/preprocessing/mne_preprocess.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/preprocessing/preprocess.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/preprocessing/util.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/preprocessing/windowers.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/regressor.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/samplers/__init__.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/samplers/base.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/samplers/ssl.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/training/__init__.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/training/callbacks.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/training/losses.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/training/scoring.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/util.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/visualization/__init__.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/visualization/activations.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/visualization/attribution.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/visualization/confusion_matrices.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/visualization/frequency.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/visualization/metrics.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/visualization/sanity.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/visualization/topology.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode.egg-info/dependency_links.txt +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode.egg-info/requires.txt +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode.egg-info/top_level.txt +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/Makefile +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/_templates/autosummary/class.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/_templates/autosummary/class_in_subdir.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/_templates/autosummary/function.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/_templates/autosummary/function_in_subdir.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/cite.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/conf.py +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/help.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/index.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/install/install.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/install/install_pip.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/install/install_source.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/models/categorization/attention.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/models/categorization/channel.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/models/categorization/convolution.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/models/categorization/filterbank.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/models/categorization/gnn.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/models/categorization/interpretable.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/models/categorization/lbm.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/models/categorization/recurrent.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/models/categorization/spd.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/models/models.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/models/models_categorization.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/models/models_table.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/models/models_visualization.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/docs/sg_execution_times.rst +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/pyproject.toml +0 -0
- {braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/setup.cfg +0 -0
{braindecode-1.8.1.dev181847394/braindecode.egg-info → braindecode-1.8.1.dev183849953}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 1.8.1.
|
|
3
|
+
Version: 1.8.1.dev183849953
|
|
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>
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"""Real-valued DFT helpers for accelerators without complex tensors.
|
|
2
|
+
|
|
3
|
+
Intel Gaudi (HPU) has no complex dtype, so ``torch.fft`` with complex outputs
|
|
4
|
+
cannot run there. These helpers express the one-sided DFT, and the inverse
|
|
5
|
+
transforms built on top of it, as matmuls against a cosine/sine basis. Under
|
|
6
|
+
bfloat16 autocast those matmuls would run in bfloat16, whereas ``torch.fft`` is
|
|
7
|
+
never downcast, so callers wrap the numerically sensitive parts with
|
|
8
|
+
:func:`fp32_island`.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
# Authors: Bruno Aristimunha <b.aristimunha@gmail.com>
|
|
12
|
+
#
|
|
13
|
+
# License: BSD (3-clause)
|
|
14
|
+
import functools
|
|
15
|
+
|
|
16
|
+
import torch
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def needs_real_dft(x: torch.Tensor) -> bool:
|
|
20
|
+
"""Whether ``x`` lives on a device without complex-tensor FFT support."""
|
|
21
|
+
return x.device.type == "hpu"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def fp32_island(fn):
|
|
25
|
+
"""Run ``fn`` with autocast disabled, in at least float32 precision.
|
|
26
|
+
|
|
27
|
+
Any bfloat16/float16 tensor argument is upcast to float32 before ``fn``
|
|
28
|
+
runs; float32 and float64 arguments are left untouched, so the same code
|
|
29
|
+
path can also be checked against a float64 ``torch.fft`` reference.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
@functools.wraps(fn)
|
|
33
|
+
def wrapped(*args, **kwargs):
|
|
34
|
+
ref = next(a for a in args if isinstance(a, torch.Tensor))
|
|
35
|
+
with torch.autocast(device_type=ref.device.type, enabled=False):
|
|
36
|
+
args = tuple(
|
|
37
|
+
a.float()
|
|
38
|
+
if isinstance(a, torch.Tensor)
|
|
39
|
+
and a.is_floating_point()
|
|
40
|
+
and torch.finfo(a.dtype).bits < 32
|
|
41
|
+
else a
|
|
42
|
+
for a in args
|
|
43
|
+
)
|
|
44
|
+
return fn(*args, **kwargs)
|
|
45
|
+
|
|
46
|
+
return wrapped
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def real_dft_basis(n, *, device, dtype):
|
|
50
|
+
"""One-sided cosine/sine basis of an ``n``-point DFT, shape ``(n // 2 + 1, n)``.
|
|
51
|
+
|
|
52
|
+
The phase index is reduced modulo ``n`` in integers before scaling, so the
|
|
53
|
+
DC row is exact (``sin`` is exactly zero there); the Nyquist row (present
|
|
54
|
+
for even ``n``) is exact to floating-point precision.
|
|
55
|
+
"""
|
|
56
|
+
if n <= 0:
|
|
57
|
+
raise ValueError("n must be positive")
|
|
58
|
+
if (n // 2) * (n - 1) >= 2**31:
|
|
59
|
+
# The int32 phase index below would overflow and give wrong phases.
|
|
60
|
+
raise ValueError(f"n={n} exceeds the 65536 samples of the real-valued DFT")
|
|
61
|
+
freqs = torch.arange(n // 2 + 1, device=device, dtype=torch.int32)
|
|
62
|
+
samples = torch.arange(n, device=device, dtype=torch.int32)
|
|
63
|
+
phase_index = (freqs[:, None] * samples[None, :]) % n
|
|
64
|
+
angles = 2 * torch.pi * phase_index.to(dtype) / n
|
|
65
|
+
return angles.cos(), angles.sin()
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def real_rfft(x):
|
|
69
|
+
"""Real and imaginary parts of ``torch.fft.rfft(x, dim=-1)`` without complex tensors."""
|
|
70
|
+
n = x.shape[-1]
|
|
71
|
+
cosine, sine = real_dft_basis(n, device=x.device, dtype=x.dtype)
|
|
72
|
+
return x @ cosine.transpose(0, 1), -(x @ sine.transpose(0, 1))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def real_irfft(real, imag, *, n):
|
|
76
|
+
"""``torch.fft.irfft(torch.complex(real, imag), n=n, dim=-1)`` without complex tensors."""
|
|
77
|
+
if real.shape[-1] != n // 2 + 1:
|
|
78
|
+
raise ValueError(
|
|
79
|
+
f"expected {n // 2 + 1} one-sided bins for n={n}, got {real.shape[-1]}"
|
|
80
|
+
)
|
|
81
|
+
cosine, sine = real_dft_basis(n, device=real.device, dtype=real.dtype)
|
|
82
|
+
output = real[..., :1] @ cosine[:1, :]
|
|
83
|
+
if n % 2 == 0:
|
|
84
|
+
interior = slice(1, -1)
|
|
85
|
+
output = output + real[..., -1:] @ cosine[-1:, :]
|
|
86
|
+
else:
|
|
87
|
+
interior = slice(1, None)
|
|
88
|
+
if real.shape[-1] > (2 if n % 2 == 0 else 1):
|
|
89
|
+
output = output + 2 * (
|
|
90
|
+
real[..., interior] @ cosine[interior, :]
|
|
91
|
+
- imag[..., interior] @ sine[interior, :]
|
|
92
|
+
)
|
|
93
|
+
return output / n
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def real_analytic_ifft(real, imag, *, n):
|
|
97
|
+
"""Inverse ``n``-point FFT of a one-sided spectrum, without complex tensors.
|
|
98
|
+
|
|
99
|
+
``real``/``imag`` hold the bins ``0 .. n // 2`` of a length-``n`` spectrum
|
|
100
|
+
whose remaining (negative-frequency) bins are zero, so this is a plain
|
|
101
|
+
(non-Hermitian) inverse DFT, not :func:`real_irfft`. Returns the real and
|
|
102
|
+
imaginary parts of the generally complex time-domain signal, each of shape
|
|
103
|
+
``(..., n)``. This is the last step of :func:`hilbert_freq_real`.
|
|
104
|
+
"""
|
|
105
|
+
if real.shape[-1] != n // 2 + 1:
|
|
106
|
+
raise ValueError(
|
|
107
|
+
f"expected {n // 2 + 1} one-sided bins for n={n}, got {real.shape[-1]}"
|
|
108
|
+
)
|
|
109
|
+
cosine, sine = real_dft_basis(n, device=real.device, dtype=real.dtype)
|
|
110
|
+
out_real = (real @ cosine - imag @ sine) / n
|
|
111
|
+
out_imag = (real @ sine + imag @ cosine) / n
|
|
112
|
+
return out_real, out_imag
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@torch.jit.unused
|
|
116
|
+
def hilbert_freq_real(x: torch.Tensor, forward_fourier: bool) -> torch.Tensor:
|
|
117
|
+
"""Real-valued equivalent of :func:`braindecode.functional.hilbert_freq`.
|
|
118
|
+
|
|
119
|
+
Lives here rather than in ``functions.py`` because ``torch.jit.unused`` needs
|
|
120
|
+
real annotations, and ``functions.py`` uses ``from __future__ import annotations``.
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
@fp32_island
|
|
124
|
+
def compute(x):
|
|
125
|
+
if forward_fourier:
|
|
126
|
+
seq_len = x.shape[-1]
|
|
127
|
+
real, imag = real_rfft(x)
|
|
128
|
+
else:
|
|
129
|
+
seq_len = 2 * (x.shape[-2] - 1)
|
|
130
|
+
real, imag = x[..., 0], x[..., 1]
|
|
131
|
+
scale = torch.full((real.shape[-1],), 2.0, dtype=real.dtype, device=real.device)
|
|
132
|
+
scale[0] = 1.0 # Don't multiply the DC-term by 2
|
|
133
|
+
if forward_fourier and seq_len % 2 == 0:
|
|
134
|
+
scale[-1] = 1.0 # Nor the Nyquist term, which only exists for even lengths
|
|
135
|
+
out_real, out_imag = real_analytic_ifft(real * scale, imag * scale, n=seq_len)
|
|
136
|
+
return torch.stack((out_real, out_imag), dim=-1)
|
|
137
|
+
|
|
138
|
+
return compute(x)
|
|
@@ -12,6 +12,8 @@ import numpy as np
|
|
|
12
12
|
import torch
|
|
13
13
|
import torch.nn.functional as F
|
|
14
14
|
|
|
15
|
+
from . import _real_dft
|
|
16
|
+
|
|
15
17
|
|
|
16
18
|
def square(x):
|
|
17
19
|
return x * x
|
|
@@ -165,6 +167,9 @@ def hilbert_freq(x: torch.Tensor, forward_fourier: bool = True) -> torch.Tensor:
|
|
|
165
167
|
https://github.com/scipy/scipy/blob/v1.14.1/scipy/signal/_signaltools.py#L2287-L2394
|
|
166
168
|
|
|
167
169
|
"""
|
|
170
|
+
if _real_dft.needs_real_dft(x):
|
|
171
|
+
return _real_dft.hilbert_freq_real(x, forward_fourier).to(x.dtype)
|
|
172
|
+
|
|
168
173
|
input_dtype = x.dtype
|
|
169
174
|
# ``view_as_complex`` does not accept bfloat16 real/imaginary pairs. The
|
|
170
175
|
# HPU path can produce bfloat16 Fourier coefficients under autocast, so do
|
|
@@ -175,12 +180,20 @@ def hilbert_freq(x: torch.Tensor, forward_fourier: bool = True) -> torch.Tensor:
|
|
|
175
180
|
x = x.float()
|
|
176
181
|
|
|
177
182
|
if forward_fourier:
|
|
183
|
+
seq_len = x.shape[-1]
|
|
178
184
|
x = torch.fft.rfft(x, norm=None, dim=-1)
|
|
179
185
|
x = torch.view_as_real(x)
|
|
186
|
+
else:
|
|
187
|
+
# The one-sided spectrum does not record whether the signal length
|
|
188
|
+
# was odd or even, so assume an even length here.
|
|
189
|
+
seq_len = 2 * (x.shape[-2] - 1)
|
|
180
190
|
x = x * 2.0
|
|
181
191
|
x[..., 0, :] = x[..., 0, :] / 2.0 # Don't multiply the DC-term by 2
|
|
192
|
+
if forward_fourier and seq_len % 2 == 0:
|
|
193
|
+
# Nor the Nyquist term, which only exists for even lengths
|
|
194
|
+
x[..., -1, :] = x[..., -1, :] / 2.0
|
|
182
195
|
x = F.pad(
|
|
183
|
-
x, [0, 0, 0, x.shape[-2]
|
|
196
|
+
x, [0, 0, 0, seq_len - x.shape[-2]]
|
|
184
197
|
) # Fill Fourier coefficients to retain shape
|
|
185
198
|
x = torch.view_as_complex(x)
|
|
186
199
|
x = torch.fft.ifft(x, norm=None, dim=-1) # returns complex signal
|
{braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/__init__.py
RENAMED
|
@@ -42,6 +42,7 @@ from .luna import LUNA
|
|
|
42
42
|
from .medformer import MEDFormer
|
|
43
43
|
from .meta_neuromotor import MetaNeuromotorHand
|
|
44
44
|
from .mirepnet import MIRepNet
|
|
45
|
+
from .mscformer import MSCFormer
|
|
45
46
|
from .msvtnet import MSVTNet
|
|
46
47
|
from .mvpformer import MVPFormer
|
|
47
48
|
from .neuropose import NeuroPose
|
|
@@ -137,6 +138,7 @@ __all__ = [
|
|
|
137
138
|
"positions_from_chs_info",
|
|
138
139
|
"MEDFormer",
|
|
139
140
|
"MIRepNet",
|
|
141
|
+
"MSCFormer",
|
|
140
142
|
"MSVTNet",
|
|
141
143
|
"MVPFormer",
|
|
142
144
|
"PBT",
|
{braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/base.py
RENAMED
|
@@ -537,12 +537,31 @@ class EEGModuleMixin(_BaseHubMixin, metaclass=_BraindecodeDocstringMeta):
|
|
|
537
537
|
if n_outputs <= 0:
|
|
538
538
|
raise ValueError(f"n_outputs must be positive; got {n_outputs}.")
|
|
539
539
|
self._n_outputs = n_outputs
|
|
540
|
+
self._update_init_kwargs(n_outputs=n_outputs)
|
|
541
|
+
|
|
542
|
+
def _update_init_kwargs(self, **init_kwargs) -> None:
|
|
543
|
+
"""Record constructor arguments that change after construction.
|
|
544
|
+
|
|
545
|
+
Helper for :meth:`reset_head` implementations that also change a
|
|
546
|
+
constructor argument, for example turning a feature extractor into a
|
|
547
|
+
classifier. Keeps the braindecode init kwargs and the Hugging Face hub
|
|
548
|
+
config in sync, so :meth:`get_config` and ``save_pretrained`` rebuild
|
|
549
|
+
the architecture the model actually has.
|
|
550
|
+
|
|
551
|
+
Parameters
|
|
552
|
+
----------
|
|
553
|
+
**init_kwargs
|
|
554
|
+
Constructor argument names mapped to their new values.
|
|
555
|
+
"""
|
|
540
556
|
for config in (
|
|
541
557
|
getattr(self, "_braindecode_init_kwargs", None),
|
|
542
558
|
getattr(self, "_hub_mixin_config", None),
|
|
543
559
|
):
|
|
544
|
-
if config is
|
|
545
|
-
|
|
560
|
+
if config is None:
|
|
561
|
+
continue
|
|
562
|
+
for name, value in init_kwargs.items():
|
|
563
|
+
if name in config:
|
|
564
|
+
config[name] = value
|
|
546
565
|
|
|
547
566
|
def reset_head(self, n_outputs):
|
|
548
567
|
"""Replace the classification head for a new number of outputs.
|
|
@@ -550,6 +569,10 @@ class EEGModuleMixin(_BaseHubMixin, metaclass=_BraindecodeDocstringMeta):
|
|
|
550
569
|
This is called automatically by :meth:`from_pretrained` when the
|
|
551
570
|
user passes an ``n_outputs`` that differs from the saved config.
|
|
552
571
|
Override in subclasses that need a model-specific head structure.
|
|
572
|
+
Implementations keep changed constructor arguments in sync with
|
|
573
|
+
``self._update_init_kwargs``, so that a saved model can be loaded
|
|
574
|
+
back. Implementations requiring positive outputs can also use
|
|
575
|
+
``self._set_n_outputs`` to validate and record the new value.
|
|
553
576
|
|
|
554
577
|
Parameters
|
|
555
578
|
----------
|
{braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/bendr.py
RENAMED
|
@@ -355,7 +355,9 @@ class BENDR(EEGModuleMixin, nn.Module):
|
|
|
355
355
|
|
|
356
356
|
def reset_head(self, n_outputs):
|
|
357
357
|
self._n_outputs = n_outputs
|
|
358
|
+
self._update_init_kwargs(n_outputs=n_outputs)
|
|
358
359
|
self.include_final_layer = True
|
|
360
|
+
self._update_init_kwargs(final_layer=True)
|
|
359
361
|
self._build_head(n_outputs)
|
|
360
362
|
|
|
361
363
|
def forward(self, x, return_features=False):
|
{braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/biot.py
RENAMED
|
@@ -237,6 +237,7 @@ class BIOT(EEGModuleMixin, nn.Module):
|
|
|
237
237
|
|
|
238
238
|
def reset_head(self, n_outputs):
|
|
239
239
|
self._n_outputs = n_outputs
|
|
240
|
+
self._update_init_kwargs(n_outputs=n_outputs)
|
|
240
241
|
self.final_layer = _ClassificationHead(
|
|
241
242
|
emb_size=self.embed_dim,
|
|
242
243
|
n_outputs=n_outputs,
|
{braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/cbramod.py
RENAMED
|
@@ -224,6 +224,9 @@ class CBraMod(EEGModuleMixin, nn.Module):
|
|
|
224
224
|
|
|
225
225
|
def reset_head(self, n_outputs):
|
|
226
226
|
self._n_outputs = n_outputs
|
|
227
|
+
self._update_init_kwargs(n_outputs=n_outputs)
|
|
228
|
+
# A head implies a classifier, also when built with return_encoder_output.
|
|
229
|
+
self._update_init_kwargs(return_encoder_output=False)
|
|
227
230
|
if self._n_times is not None and self._n_chans is not None:
|
|
228
231
|
n_patch = self._n_times // self._patch_size
|
|
229
232
|
flat_dim = self._n_chans * n_patch * self._emb_dim
|
{braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eegdino.py
RENAMED
|
@@ -260,7 +260,9 @@ class EEGDINO(EEGModuleMixin, nn.Module):
|
|
|
260
260
|
mirroring :meth:`braindecode.models.CBraMod.reset_head`.
|
|
261
261
|
"""
|
|
262
262
|
self._n_outputs = n_outputs
|
|
263
|
+
self._update_init_kwargs(n_outputs=n_outputs)
|
|
263
264
|
self.return_encoder_output = False
|
|
265
|
+
self._update_init_kwargs(return_encoder_output=False)
|
|
264
266
|
self.final_layer = self._make_head()
|
|
265
267
|
|
|
266
268
|
def forward(self, x, return_features: bool | None = None):
|
{braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/eegpt.py
RENAMED
|
@@ -371,6 +371,7 @@ class EEGPT(EEGModuleMixin, nn.Module):
|
|
|
371
371
|
|
|
372
372
|
def reset_head(self, n_outputs):
|
|
373
373
|
self._n_outputs = n_outputs
|
|
374
|
+
self._update_init_kwargs(n_outputs=n_outputs)
|
|
374
375
|
self.final_layer = _LinearConstraintProbe(
|
|
375
376
|
**self.get_probe_params(),
|
|
376
377
|
n_outputs=n_outputs,
|
{braindecode-1.8.1.dev181847394 → braindecode-1.8.1.dev183849953}/braindecode/models/labram.py
RENAMED
|
@@ -823,6 +823,7 @@ class Labram(EEGModuleMixin, nn.Module):
|
|
|
823
823
|
|
|
824
824
|
def reset_head(self, n_outputs):
|
|
825
825
|
self._n_outputs = n_outputs
|
|
826
|
+
self._update_init_kwargs(n_outputs=n_outputs)
|
|
826
827
|
self.reset_classifier(n_outputs)
|
|
827
828
|
|
|
828
829
|
def _adj_temporal_embedding(self, num_ch, batch_size, dim_embed=None):
|
|
@@ -486,6 +486,7 @@ class MetaNeuromotorHand(EEGModuleMixin, nn.Module, license="cc-by-nc-4.0"):
|
|
|
486
486
|
"""Replace the classification head for a new number of outputs."""
|
|
487
487
|
self.final_layer = nn.Linear(self.final_layer.in_features, n_outputs)
|
|
488
488
|
self._n_outputs = n_outputs
|
|
489
|
+
self._update_init_kwargs(n_outputs=n_outputs)
|
|
489
490
|
|
|
490
491
|
def compute_output_lengths(self, input_lengths: torch.Tensor) -> torch.Tensor:
|
|
491
492
|
"""Compute the valid emission length for each input sequence.
|