braindecode 1.8.1.dev179960918__tar.gz → 1.8.1.dev180358634__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.dev179960918/braindecode.egg-info → braindecode-1.8.1.dev180358634}/PKG-INFO +1 -1
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/tuh.py +8 -4
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/attn_sleep.py +4 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/base.py +34 -15
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/csbrain.py +5 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/deep4.py +10 -1
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/dgcnn.py +2 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/medformer.py +4 -1
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/neurorvq_tokenizer.py +9 -6
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/reve.py +13 -1
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/tcn.py +5 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/usleep.py +3 -2
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/zuna.py +6 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/quantization.py +10 -6
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/preprocessing/preprocess.py +2 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/preprocessing/windowers.py +3 -1
- braindecode-1.8.1.dev180358634/braindecode/version.py +1 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634/braindecode.egg-info}/PKG-INFO +1 -1
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/whats_new.rst +9 -0
- braindecode-1.8.1.dev179960918/braindecode/version.py +0 -1
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/LICENSE.txt +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/MANIFEST.in +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/NOTICE.txt +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/README.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/__init__.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/augmentation/__init__.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/augmentation/base.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/augmentation/functional.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/augmentation/transforms.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/classifier.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/__init__.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/_notebook_viewer.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/base.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/bbci.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/bcicomp.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/bids/__init__.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/bids/datasets.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/bids/format.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/bids/hub.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/bids/hub_format.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/bids/hub_io.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/bids/hub_validation.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/bids/iterable.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/chb_mit.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/collate.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/mne.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/moabb.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/nmt.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/registry.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/siena.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/sleep_physionet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/utils.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/xy.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datautil/__init__.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datautil/channel_utils.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datautil/hub_formats.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datautil/serialization.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datautil/util.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/eegneuralnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/functional/__init__.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/functional/_real_dft.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/functional/functions.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/functional/initialization.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/__init__.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/atcnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/attentionbasenet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/axon.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/barista.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/bendr.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/biot.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/brainbert.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/brainmodule.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/brainomni.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/brant.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/cbramod.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/codebrain.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/config.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/contrawr.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/ctnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/dance.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/deepsleepnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/diver1.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eeg_clip.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegconformer.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegdino.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eeginception_erp.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eeginception_mi.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegitnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegminer.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegnex.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegpt.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegsimpleconv.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegsym.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegtcnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/emg2qwerty.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/fbcnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/fblightconvnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/fbmsnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/guetschel2026.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/hybrid.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/ifnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/labram.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/luna.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/mapa.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/meta_neuromotor.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/mirepnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/mscformer.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/msvtnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/mvpformer.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/neuropose.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/neurorvq.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/patchedtransformer.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/popt.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/sccnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/seizure_transformer.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/sensingdynamics.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/shallow_fbcsp.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/signal_jepa.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/sinc_shallow.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/sleepfm.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/sparcnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/sstdpn.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/steegformer.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/summary.csv +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/syncnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/tcformer.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/tfm_tokenizer.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/tidnet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/tmsanet.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/tsinception.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/util.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/vemg2pose.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/__init__.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/activation.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/attention.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/blocks.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/channels.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/convolution.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/dance_modules.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/filter.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/layers.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/linear.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/linear_attention.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/parametrization.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/popt_modules.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/stats.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/util.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/modules/wrapper.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/preprocessing/__init__.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/preprocessing/mne_preprocess.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/preprocessing/util.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/regressor.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/samplers/__init__.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/samplers/base.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/samplers/ssl.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/training/__init__.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/training/callbacks.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/training/losses.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/training/scoring.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/util.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/visualization/__init__.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/visualization/activations.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/visualization/attribution.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/visualization/confusion_matrices.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/visualization/frequency.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/visualization/metrics.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/visualization/sanity.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/visualization/topology.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode.egg-info/SOURCES.txt +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode.egg-info/dependency_links.txt +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode.egg-info/requires.txt +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode.egg-info/top_level.txt +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/Makefile +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/_templates/autosummary/class.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/_templates/autosummary/class_in_subdir.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/_templates/autosummary/function.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/_templates/autosummary/function_in_subdir.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/agent_docs.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/api.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/cite.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/conf.py +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/help.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/index.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/install/install.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/install/install_pip.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/install/install_source.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/models/categorization/attention.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/models/categorization/channel.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/models/categorization/convolution.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/models/categorization/filterbank.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/models/categorization/gnn.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/models/categorization/interpretable.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/models/categorization/lbm.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/models/categorization/recurrent.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/models/categorization/spd.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/models/models.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/models/models_categorization.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/models/models_table.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/models/models_visualization.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/sg_execution_times.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/docs/user_guide/channel_strategies.rst +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/pyproject.toml +0 -0
- {braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/setup.cfg +0 -0
{braindecode-1.8.1.dev179960918/braindecode.egg-info → braindecode-1.8.1.dev180358634}/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.dev180358634
|
|
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>
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/tuh.py
RENAMED
|
@@ -241,7 +241,11 @@ class TUH(BaseConcatDataset):
|
|
|
241
241
|
# file paths, use this instead as before
|
|
242
242
|
if "year" in description:
|
|
243
243
|
meas_date = meas_date.replace(*description[["year", "month", "day"]])
|
|
244
|
-
|
|
244
|
+
# FIF (e.g. preprocess(..., save_dir=...)) stores dates from 1901-12-13 to
|
|
245
|
+
# 2038-01-19 only: undated recordings (year 1 above) and de-identified ones
|
|
246
|
+
# (TUAB has 1899-12-30) keep their date in the description only.
|
|
247
|
+
in_fif_range = -(2**31) <= meas_date.timestamp() < 2**31
|
|
248
|
+
raw.set_meas_date(meas_date if in_fif_range else None)
|
|
245
249
|
|
|
246
250
|
d = {
|
|
247
251
|
"age": int(age),
|
|
@@ -251,9 +255,9 @@ class TUH(BaseConcatDataset):
|
|
|
251
255
|
# if not, get it from meas_date in raw.info and add to description
|
|
252
256
|
# if meas_date is None, create fake one
|
|
253
257
|
if "year" not in description:
|
|
254
|
-
d["year"] =
|
|
255
|
-
d["month"] =
|
|
256
|
-
d["day"] =
|
|
258
|
+
d["year"] = meas_date.year
|
|
259
|
+
d["month"] = meas_date.month
|
|
260
|
+
d["day"] = meas_date.day
|
|
257
261
|
|
|
258
262
|
# read info relevant for preprocessing from raw without loading it
|
|
259
263
|
if add_physician_reports:
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/attn_sleep.py
RENAMED
|
@@ -143,6 +143,10 @@ class AttnSleep(EEGModuleMixin, nn.Module):
|
|
|
143
143
|
sfreq=sfreq,
|
|
144
144
|
)
|
|
145
145
|
del n_outputs, n_chans, chs_info, n_times, input_window_seconds, sfreq
|
|
146
|
+
if self._n_chans_for_jit not in (None, 1):
|
|
147
|
+
raise ValueError(
|
|
148
|
+
f"AttnSleep takes single-channel input; got n_chans={self._n_chans_for_jit}."
|
|
149
|
+
)
|
|
146
150
|
|
|
147
151
|
self.mapping = {
|
|
148
152
|
"fc.weight": "final_layer.weight",
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/base.py
RENAMED
|
@@ -46,6 +46,24 @@ _GEOMETRY_KWARGS = (
|
|
|
46
46
|
)
|
|
47
47
|
|
|
48
48
|
|
|
49
|
+
def _too_short_input_error(exc: RuntimeError, input_shape) -> Optional[ValueError]:
|
|
50
|
+
"""ValueError for a layer that found the input too short, else None."""
|
|
51
|
+
if not str(exc).endswith(
|
|
52
|
+
(
|
|
53
|
+
"Output size is too small",
|
|
54
|
+
"Kernel size can't be greater than actual input size",
|
|
55
|
+
)
|
|
56
|
+
):
|
|
57
|
+
return None
|
|
58
|
+
return ValueError(
|
|
59
|
+
"During model prediction RuntimeError was thrown showing that at some "
|
|
60
|
+
f"layer `{str(exc).split('.')[-1]}` (see above in the stacktrace). This "
|
|
61
|
+
"could be caused by providing too small `n_times`/`input_window_seconds`. "
|
|
62
|
+
"Model may require longer chunks of signal in the input than "
|
|
63
|
+
f"{input_shape}."
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
49
67
|
_HF_INSTALL_HINT = (
|
|
50
68
|
"requires the `huggingface_hub` package. "
|
|
51
69
|
"Install with: pip install 'braindecode[hub]'"
|
|
@@ -483,6 +501,18 @@ class EEGModuleMixin(_BaseHubMixin, metaclass=_BraindecodeDocstringMeta):
|
|
|
483
501
|
# Called by torch.jit.script before compiling the model.
|
|
484
502
|
return make_parametrizations_scriptable(self)
|
|
485
503
|
|
|
504
|
+
def __call__(self, *args, **kwargs):
|
|
505
|
+
# An input shorter than the layers need raises ValueError, not a torch
|
|
506
|
+
# RuntimeError from deep inside forward.
|
|
507
|
+
try:
|
|
508
|
+
return super().__call__(*args, **kwargs)
|
|
509
|
+
except RuntimeError as exc:
|
|
510
|
+
shape = tuple(args[0].shape) if args and hasattr(args[0], "shape") else None
|
|
511
|
+
error = _too_short_input_error(exc, shape)
|
|
512
|
+
if error is None:
|
|
513
|
+
raise
|
|
514
|
+
raise error from exc
|
|
515
|
+
|
|
486
516
|
def get_output_shape(self) -> tuple[int, ...]:
|
|
487
517
|
"""Returns shape of neural network output for batch size equal 1.
|
|
488
518
|
|
|
@@ -506,21 +536,10 @@ class EEGModuleMixin(_BaseHubMixin, metaclass=_BraindecodeDocstringMeta):
|
|
|
506
536
|
.shape
|
|
507
537
|
)
|
|
508
538
|
except RuntimeError as exc:
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
)
|
|
514
|
-
):
|
|
515
|
-
msg = (
|
|
516
|
-
"During model prediction RuntimeError was thrown showing that at some "
|
|
517
|
-
f"layer `{str(exc).split('.')[-1]}` (see above in the stacktrace). This "
|
|
518
|
-
"could be caused by providing too small `n_times`/`input_window_seconds`. "
|
|
519
|
-
"Model may require longer chunks of signal in the input than "
|
|
520
|
-
f"{self.input_shape}."
|
|
521
|
-
)
|
|
522
|
-
raise ValueError(msg) from exc
|
|
523
|
-
raise exc
|
|
539
|
+
error = _too_short_input_error(exc, self.input_shape)
|
|
540
|
+
if error is None:
|
|
541
|
+
raise
|
|
542
|
+
raise error from exc
|
|
524
543
|
|
|
525
544
|
def get_config(self) -> dict:
|
|
526
545
|
"""Return a JSON-serializable dict of all ``__init__`` parameters.
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/csbrain.py
RENAMED
|
@@ -314,6 +314,11 @@ class CSBrain(EEGModuleMixin, nn.Module):
|
|
|
314
314
|
sfreq=sfreq,
|
|
315
315
|
)
|
|
316
316
|
del n_chans, chs_info, n_times, input_window_seconds, sfreq, n_outputs
|
|
317
|
+
n_times = self._n_times_or_none()
|
|
318
|
+
if n_times is not None and n_times % patch_size:
|
|
319
|
+
raise ValueError(
|
|
320
|
+
f"n_times ({n_times}) must be a multiple of patch_size ({patch_size})."
|
|
321
|
+
)
|
|
317
322
|
|
|
318
323
|
self.rearrange = Rearrange(
|
|
319
324
|
"batch n_chans (n_patch patch_size) -> batch n_chans n_patch patch_size",
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/deep4.py
RENAMED
|
@@ -170,6 +170,10 @@ class Deep4Net(EEGModuleMixin, nn.Sequential):
|
|
|
170
170
|
):
|
|
171
171
|
resolved_n_times = round(self._input_window_seconds * self._sfreq)
|
|
172
172
|
|
|
173
|
+
if resolved_n_times is not None and resolved_n_times >= min_n_times:
|
|
174
|
+
# The bound above ignores stride_before_pool and an integer
|
|
175
|
+
# final_conv_length; inputs it admits are checked with the exact one.
|
|
176
|
+
min_n_times = self._get_min_n_times(exact=True)
|
|
173
177
|
if resolved_n_times is not None and resolved_n_times < min_n_times:
|
|
174
178
|
scaling_factor = resolved_n_times / min_n_times
|
|
175
179
|
warn(
|
|
@@ -363,13 +367,15 @@ class Deep4Net(EEGModuleMixin, nn.Sequential):
|
|
|
363
367
|
|
|
364
368
|
self.train()
|
|
365
369
|
|
|
366
|
-
def _get_min_n_times(self) -> int:
|
|
370
|
+
def _get_min_n_times(self, exact: bool = False) -> int:
|
|
367
371
|
"""
|
|
368
372
|
Calculate the minimum number of time samples required for the model
|
|
369
373
|
to work with the given temporal parameters.
|
|
370
374
|
"""
|
|
371
375
|
# Start with the minimum valid output length of the network (1)
|
|
372
376
|
min_len = 1
|
|
377
|
+
if exact and isinstance(self.final_conv_length, int):
|
|
378
|
+
min_len = self.final_conv_length
|
|
373
379
|
|
|
374
380
|
# List of conv kernel sizes and pool parameters for the 4 blocks, in reverse order
|
|
375
381
|
# Each tuple: (filter_length, pool_length, pool_stride)
|
|
@@ -382,6 +388,9 @@ class Deep4Net(EEGModuleMixin, nn.Sequential):
|
|
|
382
388
|
|
|
383
389
|
# Work backward from the last layer to the input
|
|
384
390
|
for filter_len, pool_len, pool_stride in block_params:
|
|
391
|
+
if exact and self.stride_before_pool: # strided conv, then pool stride 1
|
|
392
|
+
min_len = pool_stride * (min_len + pool_len - 2) + filter_len
|
|
393
|
+
continue
|
|
385
394
|
# Reverse the pooling operation
|
|
386
395
|
# L_in = stride * (L_out - 1) + kernel_size
|
|
387
396
|
min_len = pool_stride * (min_len - 1) + pool_len
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/dgcnn.py
RENAMED
|
@@ -162,6 +162,8 @@ def _build_initial_adjacency(chs_info, n_chans, n_neighbors=5):
|
|
|
162
162
|
"with 3-D positions or that channel names match a standard montage."
|
|
163
163
|
)
|
|
164
164
|
|
|
165
|
+
if n_chans < 2:
|
|
166
|
+
raise ValueError("DGCNN needs at least 2 channels to build its channel graph.")
|
|
165
167
|
n_neighbors_capped = min(n_neighbors, n_chans - 1)
|
|
166
168
|
|
|
167
169
|
# Pairwise Euclidean distances
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/medformer.py
RENAMED
|
@@ -411,7 +411,10 @@ class _ListPatchEmbedding(nn.Module):
|
|
|
411
411
|
]
|
|
412
412
|
self.value_embeddings = nn.ModuleList(linear_layers)
|
|
413
413
|
self.position_embedding = _PositionalEmbedding(d_model=d_model)
|
|
414
|
-
|
|
414
|
+
# One row per time sample: windows longer than 5000 samples need more.
|
|
415
|
+
self.channel_embedding = _PositionalEmbedding(
|
|
416
|
+
d_model=seq_len, max_len=max(5000, enc_in)
|
|
417
|
+
)
|
|
415
418
|
self.dropout = nn.Dropout(dropout)
|
|
416
419
|
|
|
417
420
|
self.learnable_embeddings = nn.ParameterList(
|
|
@@ -93,19 +93,22 @@ class _EMAVectorQuantizer(nn.Module):
|
|
|
93
93
|
if self.training or self.statistic_code_usage:
|
|
94
94
|
with torch.no_grad():
|
|
95
95
|
weight = self.embedding.weight
|
|
96
|
-
|
|
97
|
-
counts
|
|
96
|
+
# Per-code counts and sums by index_add_ (at least float32: exact
|
|
97
|
+
# counts) instead of a dense (N, n_codes) one-hot GEMM; no host sync
|
|
98
|
+
# (bincount reads the index range).
|
|
99
|
+
work = torch.promote_types(vectors.dtype, torch.float32)
|
|
100
|
+
ones = vectors.new_ones(indices.shape[0], dtype=work)
|
|
101
|
+
counts = ones.new_zeros(weight.shape[0]).index_add_(0, indices, ones)
|
|
98
102
|
if not torch.jit.is_scripting():
|
|
99
103
|
_all_reduce_sum(counts)
|
|
100
104
|
self.cluster_size.mul_(self.decay).add_(counts, alpha=1 - self.decay)
|
|
101
105
|
if self.training:
|
|
102
106
|
safe_counts = counts.masked_fill(counts == 0, 1.0)
|
|
103
|
-
embed_sum =
|
|
107
|
+
embed_sum = ones.new_zeros(weight.shape)
|
|
108
|
+
embed_sum = embed_sum.index_add_(0, indices, vectors.to(work))
|
|
104
109
|
if not torch.jit.is_scripting():
|
|
105
110
|
_all_reduce_sum(embed_sum)
|
|
106
|
-
means = F.normalize(
|
|
107
|
-
(embed_sum / safe_counts.unsqueeze(0)).T, dim=-1
|
|
108
|
-
)
|
|
111
|
+
means = F.normalize(embed_sum / safe_counts.unsqueeze(1), dim=-1)
|
|
109
112
|
means = torch.where(counts[:, None] == 0, weight, means)
|
|
110
113
|
weight.mul_(self.decay).add_(means, alpha=1 - self.decay)
|
|
111
114
|
weight.copy_(F.normalize(weight, dim=-1))
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/reve.py
RENAMED
|
@@ -278,6 +278,10 @@ class REVE(EEGModuleMixin, nn.Module):
|
|
|
278
278
|
self.freqs = freqs
|
|
279
279
|
self.patch_size = patch_size
|
|
280
280
|
self.patch_overlap = patch_overlap
|
|
281
|
+
if self._n_times is not None and self._n_times < patch_size:
|
|
282
|
+
raise ValueError(
|
|
283
|
+
f"n_times ({self._n_times}) must be at least patch_size ({patch_size})."
|
|
284
|
+
)
|
|
281
285
|
self.depth = depth
|
|
282
286
|
self.heads = heads
|
|
283
287
|
self.head_dim = head_dim
|
|
@@ -318,7 +322,15 @@ class REVE(EEGModuleMixin, nn.Module):
|
|
|
318
322
|
|
|
319
323
|
self.default_pos = None
|
|
320
324
|
if chs_info is not None:
|
|
321
|
-
|
|
325
|
+
names = [ch["ch_name"] for ch in chs_info]
|
|
326
|
+
missing = [n for n in names if n not in self._position_bank.mapping]
|
|
327
|
+
if missing:
|
|
328
|
+
raise ValueError(
|
|
329
|
+
f"The REVE position bank has no position for {missing}. Use "
|
|
330
|
+
"its channel names (RevePositionBank().get_all_positions()), "
|
|
331
|
+
"or build without chs_info and pass pos to forward."
|
|
332
|
+
)
|
|
333
|
+
self.default_pos = self.get_positions(names)
|
|
322
334
|
|
|
323
335
|
def _get_flattened_output_dim(self) -> int:
|
|
324
336
|
"""Helper function to compute the flattened output dimension after the transformer."""
|
|
@@ -79,6 +79,11 @@ class BDTCN(EEGModuleMixin, nn.Module):
|
|
|
79
79
|
drop_prob=drop_prob,
|
|
80
80
|
activation=activation,
|
|
81
81
|
)
|
|
82
|
+
if self._n_times is not None and self._n_times < self.base_tcn.min_len:
|
|
83
|
+
raise ValueError(
|
|
84
|
+
f"n_times ({self._n_times}) must be at least {self.base_tcn.min_len}, "
|
|
85
|
+
"the receptive field of the temporal blocks."
|
|
86
|
+
)
|
|
82
87
|
|
|
83
88
|
self.final_layer = torch.nn.Sequential(
|
|
84
89
|
torch.nn.AdaptiveAvgPool1d(1), torch.nn.Flatten()
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/usleep.py
RENAMED
|
@@ -211,8 +211,9 @@ class USleep(EEGModuleMixin, nn.Module):
|
|
|
211
211
|
time_conv_size += 1
|
|
212
212
|
else:
|
|
213
213
|
raise ValueError(
|
|
214
|
-
"time_conv_size
|
|
215
|
-
"upsampling step in the
|
|
214
|
+
f"time_conv_size = round(time_conv_size_s * sfreq) = "
|
|
215
|
+
f"{time_conv_size} must be odd for the upsampling step in the "
|
|
216
|
+
"decoder blocks; pass ensure_odd_conv_size=True."
|
|
216
217
|
)
|
|
217
218
|
|
|
218
219
|
channels = [self.n_chans]
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/zuna.py
RENAMED
|
@@ -262,6 +262,12 @@ class ZUNA(EEGModuleMixin, nn.Module, license="apache-2.0"):
|
|
|
262
262
|
raise ValueError("ZUNA requires finite 3D locations for every channel.")
|
|
263
263
|
if head_dim % 8 != 0:
|
|
264
264
|
raise ValueError("head_dim must be divisible by eight for 4D RoPE.")
|
|
265
|
+
if coarse_time_points > max_seqlen:
|
|
266
|
+
raise ValueError(
|
|
267
|
+
f"n_times ({self.n_times}) gives {coarse_time_points} patches of "
|
|
268
|
+
f"{fine_time_pts} samples; max_seqlen={max_seqlen} allows at most "
|
|
269
|
+
f"{max_seqlen * fine_time_pts} samples."
|
|
270
|
+
)
|
|
265
271
|
|
|
266
272
|
# Layers
|
|
267
273
|
self.patch_embedding = nn.Sequential(
|
|
@@ -237,21 +237,25 @@ class EMACodebook(nn.Module):
|
|
|
237
237
|
quantize = self.dequantize(embed_ind).type(dtype)
|
|
238
238
|
|
|
239
239
|
if self.training:
|
|
240
|
-
# F.one_hot reads the index range on the host (a device sync).
|
|
241
|
-
codes = torch.arange(self.codebook_size, device=flat_ind.device)
|
|
242
|
-
embed_onehot = (flat_ind.unsqueeze(-1) == codes).type(dtype)
|
|
243
240
|
# As in the released encodec/BrainOmni ``EuclideanCodebook``, the
|
|
244
241
|
# replacement writes ``embed`` only, and the EMA step below rebuilds
|
|
245
242
|
# ``embed`` from ``embed_avg``. Kept as released for checkpoint parity.
|
|
246
243
|
self.expire_codes_(x)
|
|
247
|
-
# EMA update of the cluster sizes and code sums (.data detaches grad)
|
|
248
|
-
|
|
244
|
+
# EMA update of the cluster sizes and code sums (.data detaches grad),
|
|
245
|
+
# summed per code by index_add_ (at least float32: exact counts) instead
|
|
246
|
+
# of a dense (N, codebook_size) one-hot and GEMM; no host sync either
|
|
247
|
+
# (bincount and F.one_hot read the index range).
|
|
248
|
+
work = torch.promote_types(dtype, torch.float32)
|
|
249
|
+
ones = x.new_ones(flat_ind.shape[0], dtype=work)
|
|
250
|
+
one_hot_sum = ones.new_zeros(self.codebook_size)
|
|
251
|
+
one_hot_sum = one_hot_sum.index_add_(0, flat_ind, ones).type(dtype)
|
|
249
252
|
if not torch.jit.is_scripting():
|
|
250
253
|
_all_reduce_sum(one_hot_sum)
|
|
251
254
|
self.cluster_size.data.mul_(self.decay).add_(
|
|
252
255
|
one_hot_sum, alpha=1 - self.decay
|
|
253
256
|
)
|
|
254
|
-
embed_sum = (
|
|
257
|
+
embed_sum = ones.new_zeros(self.codebook_size, x.shape[1])
|
|
258
|
+
embed_sum = embed_sum.index_add_(0, flat_ind, x.to(work)).to(torch.float32)
|
|
255
259
|
if not torch.jit.is_scripting():
|
|
256
260
|
_all_reduce_sum(embed_sum)
|
|
257
261
|
self.embed_avg.data.mul_(self.decay).add_(embed_sum, alpha=1 - self.decay)
|
|
@@ -312,6 +312,8 @@ def preprocess(
|
|
|
312
312
|
preload=False,
|
|
313
313
|
target_name=None,
|
|
314
314
|
ids_to_load=ids_to_load,
|
|
315
|
+
# mne Epochs cannot be read in parallel with preload=False
|
|
316
|
+
n_jobs=n_jobs if hasattr(concat_ds.datasets[0], "raw") else 1,
|
|
315
317
|
)
|
|
316
318
|
_replace_inplace(concat_ds, concat_ds_reloaded)
|
|
317
319
|
else:
|
|
@@ -619,7 +619,9 @@ def create_fixed_length_windows(
|
|
|
619
619
|
f"Window size {window_size_samples} exceeds trial duration {lengths.min()}."
|
|
620
620
|
)
|
|
621
621
|
|
|
622
|
-
|
|
622
|
+
# Threads: each recording costs well under a millisecond, while worker
|
|
623
|
+
# processes would pickle every raw there and every windowed dataset back.
|
|
624
|
+
list_of_windows_ds = Parallel(n_jobs=n_jobs, prefer="threads")(
|
|
623
625
|
delayed(_create_fixed_length_windows)(
|
|
624
626
|
ds,
|
|
625
627
|
start_offset_samples,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.8.1.dev180358634"
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634/braindecode.egg-info}/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.dev180358634
|
|
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>
|
|
@@ -28,6 +28,8 @@ Current 1.8.1 (2026-08-31)
|
|
|
28
28
|
Enhancements
|
|
29
29
|
============
|
|
30
30
|
|
|
31
|
+
- :class:`braindecode.models.NeuroRVQTokenizer` sums the per-code counts and vectors of its EMA codebook update with ``index_add_`` instead of a dense one-hot matrix and GEMM: CPU train step 1.3x faster (22 channels, batch 32, 2 threads), Gaudi unchanged; outputs, gradients and token ids unchanged, the updated codebooks change by float rounding only (:gh:`1308` by `Bruno Aristimunha`_).
|
|
32
|
+
- ``braindecode.modules.EMACodebook`` sums its training EMA statistics per code with ``index_add_`` instead of a dense one-hot matrix and GEMM: :class:`braindecode.models.TFMTokenizer` CPU train step 5 % faster and :class:`braindecode.models.BrainTokenizer` 1-3 % (22 channels, batch 32, 2 threads); outputs, gradients and token ids unchanged, the EMA buffers change by float rounding only (:gh:`1306` by `Bruno Aristimunha`_).
|
|
31
33
|
- The TUH datasets read the ``_date.txt`` file kept beside each EDF with :func:`json.load` instead of :func:`pandas.read_json`: 2.9 s -> 0.04 s for the 2993 TUAB date files; descriptions unchanged (:gh:`1300` by `Bruno Aristimunha`_).
|
|
32
34
|
- Add :class:`braindecode.models.Guetschel2026`, the encoder shared by the 58 MAE and JEPA
|
|
33
35
|
checkpoints of the EEG masking-geometry study (Guetschel et al., 2026). The checkpoints
|
|
@@ -47,9 +49,11 @@ Enhancements
|
|
|
47
49
|
- :class:`braindecode.models.BIOT` computes the spectrograms of all channels with one STFT instead of one per channel: Gaudi forward 1.6x and train step 1.35x faster (22 channels, batch 32), CPU registry forward 3 % faster; outputs and gradients unchanged bit for bit, also with the released weights (:gh:`1284` by `Bruno Aristimunha`_).
|
|
48
50
|
- :class:`braindecode.models.MVPFormer` builds its attention masks and channel-shift index once per forward instead of in every layer: forward 19-25 % faster on Gaudi and 2-12 % on CPU, outputs and gradients unchanged bit for bit (:gh:`1280` by `Bruno Aristimunha`_).
|
|
49
51
|
- :class:`braindecode.models.AttnSleep`, :class:`braindecode.models.Brant`, :class:`braindecode.models.MSVTNet` and :class:`braindecode.models.PBT` no longer compute tensors their forward discards (AttnSleep's first attention product, Brant's reconstruction projection, MSVTNet's branch heads without ``return_features``, PBT's class-token index); outputs and gradients unchanged bit for bit (:gh:`1281` by `Bruno Aristimunha`_).
|
|
52
|
+
- :func:`braindecode.preprocessing.preprocess` with ``save_dir`` reloads the saved recordings with its ``n_jobs`` instead of one at a time: TUAB (2993 recordings, ``n_jobs=16``) preprocess 626.8 s -> 386.4 s, the final reload 260.1 s -> 65.4 s; saved files and returned datasets unchanged (:gh:`1302` by `Bruno Aristimunha`_).
|
|
50
53
|
- :class:`braindecode.models.CSBrain` copies each region's mean feature into its electrodes with one slice assignment per region instead of one per electrode: train step about 10 % and forward 7 % faster on Gaudi (22 channels, batch 32), unchanged on CPU; outputs are unchanged and gradients change by float rounding only, within master's own float32-vs-float64 difference (:gh:`1285` by `Bruno Aristimunha`_).
|
|
51
54
|
- :class:`braindecode.models.AXON` runs one temporal attention per block instead of two when the window has at most ``temporal_window + 1`` patches (every window up to 5.5 s at the defaults), where the restricted and full temporal branches are identical: train step 7 % faster on CPU and 12 % on Gaudi (22 channels, 5 s, batch 32); outputs are unchanged and gradients change by float rounding only, within master's own float32-vs-float64 difference (:gh:`1286` by `Bruno Aristimunha`_).
|
|
52
55
|
- :class:`braindecode.modules.FilterBankLayer` broadcasts each FIR band filter over the channels instead of repeating it, so its FFT is computed once per band: :class:`braindecode.models.FBCNet`, :class:`braindecode.models.FBMSNet`, :class:`braindecode.models.FBLightConvNet` and :class:`braindecode.models.IFNet` steps 1-10 % faster on CPU and 8-29 % on Gaudi at batch 2, 0-3 % at batch 32; outputs and gradients change by float rounding only at 22 channels, within master's own float32-vs-float64 difference, and not at all at 3 channels (:gh:`1278` by `Bruno Aristimunha`_).
|
|
56
|
+
- :func:`braindecode.preprocessing.create_fixed_length_windows` runs its per-recording calls in threads when ``n_jobs > 1``, instead of pickling every recording to worker processes and back: TUAB (2993 recordings) with ``n_jobs=8`` 52.3 s -> 5.5 s (``n_jobs=1``: 1.8 s, unchanged); windows unchanged (:gh:`1303` by `Bruno Aristimunha`_).
|
|
53
57
|
- :class:`braindecode.models.MEDFormer` adds its channel embedding once instead of once per granularity, and runs its layer norms and kernel-1 feed-forward convolutions once on all granularities (dropout stays per granularity, same masks): train step 3-7 % faster on CPU and 6-7 % on Gaudi; outputs change by float rounding only (:gh:`1288` by `Bruno Aristimunha`_).
|
|
54
58
|
- :func:`braindecode.functional.plv_time` copies the real and imaginary phasor parts once instead of in every matmul for each batch matrix: :class:`braindecode.models.EEGMiner` CPU forward 1.5x and train step 1.4x faster (22 channels, batch 32, 2 threads); outputs and gradients change by float rounding only, within master's own float32-vs-float64 difference (:gh:`1277` by `Bruno Aristimunha`_).
|
|
55
59
|
- ``braindecode.modules.EMACodebook`` builds its one-hot code matrix only in training, where the EMA update reads it: eval forward of :class:`braindecode.models.TFMTokenizer` 5 % faster on CPU (22 channels, batch 32; 208 MB less temporary memory) and of :class:`braindecode.models.BrainTokenizer` / :class:`braindecode.models.BrainOmni` 0.5-2 %; outputs, gradients, buffers and token ids unchanged bit for bit (:gh:`1290` by `Bruno Aristimunha`_).
|
|
@@ -366,12 +370,17 @@ Requirements
|
|
|
366
370
|
Bug fixes
|
|
367
371
|
==========
|
|
368
372
|
|
|
373
|
+
- :class:`braindecode.datasets.TUH`, :class:`braindecode.datasets.TUHAbnormal` and :class:`braindecode.datasets.TUHEvents` keep a recording date that FIF cannot store (before 1901-12-13: the year-1 placeholder of undated recordings, the de-identified 1899-12-30 of 16 TUAB v3.0.1 EDFs) in the description only and leave the raw's ``meas_date`` empty, so :func:`braindecode.preprocessing.preprocess` with ``save_dir`` no longer aborts on them (:gh:`1307` by `Bruno Aristimunha`_).
|
|
369
374
|
- :class:`braindecode.models.MEDFormer` runs its patch embedding, a Conv2d kernel as tall as ``n_times``, as the equivalent conv1d with ``n_times`` input channels: MEDFormer now runs on Gaudi2, whose convolution kernels are limited to 256 rows (it failed to compile for ``n_times > 256``), and its CPU train step is 15-35 % faster; same state dict, outputs change by float rounding only (:gh:`1287` by `Bruno Aristimunha`_).
|
|
375
|
+
- :class:`braindecode.models.REVE`, :class:`braindecode.models.CSBrain`, :class:`braindecode.models.AttnSleep`, :class:`braindecode.models.BDTCN`, :class:`braindecode.models.ZUNA` and :class:`braindecode.models.DGCNN` raise a :class:`ValueError` at construction for input geometries they cannot run (channel names missing from REVE's position bank or windows shorter than its patch, CSBrain windows that are not a multiple of ``patch_size``, more than one AttnSleep channel, windows shorter than the BDTCN receptive field, more ZUNA time patches than ``max_seqlen``, a single DGCNN channel) instead of failing in ``forward`` or with an unrelated error; the :class:`braindecode.models.USleep` error for an even kernel size names ``ensure_odd_conv_size`` (:gh:`1313` by `Bruno Aristimunha`_).
|
|
370
376
|
- Fix coordinate ordering in :class:`braindecode.augmentation.SensorsRotation` with ``spherical_splines=False``, which raised an error or interpolated the wrong locations (:gh:`1295` by `Anton Soloviev`_).
|
|
377
|
+
- :class:`braindecode.models.Deep4Net` with ``stride_before_pool=True`` or an integer ``final_conv_length`` crashed in ``forward`` for windows between its approximate and exact minimum length, e.g. 441-681 samples for :class:`braindecode.models.EEGCLIP` (2 s at 250 Hz); those windows now shrink the temporal kernels like shorter ones, other windows unchanged bit for bit (:gh:`1310` by `Bruno Aristimunha`_).
|
|
371
378
|
- Preserve the final samples in :class:`braindecode.augmentation.SegmentationReconstruction`
|
|
372
379
|
when the window length is not divisible by the segment count, instead of
|
|
373
380
|
replacing them with zeros (:gh:`1279` by `Anton Soloviev`_).
|
|
381
|
+
- :class:`braindecode.models.MEDFormer` crashed in ``forward`` for windows longer than 5000 samples (e.g. 30 s at 200 Hz): its time-indexed positional table now has ``max(5000, n_times)`` rows; shorter windows unchanged bit for bit (:gh:`1311` by `Bruno Aristimunha`_).
|
|
374
382
|
- Preserve regression windows whose target is at the final recording sample in :func:`braindecode.preprocessing.create_windows_from_target_channels`, independently of the recording time origin (:gh:`1296` by `Anton Soloviev`_).
|
|
383
|
+
- Every model raises a :class:`ValueError` naming ``n_times`` and the input shape when called on a window shorter than its layers need, instead of a torch ``RuntimeError`` (``Output size is too small`` / ``Kernel size can't be greater than actual input size``) from deep inside ``forward``; :meth:`braindecode.models.EEGModuleMixin.get_output_shape` already did so at construction (:gh:`1317` by `Bruno Aristimunha`_).
|
|
375
384
|
- Model fixes caught by new CPU-only integration checks (complex tensors, host syncs, kernel gaps, device/dtype follow, training after ``inference_mode``, deepcopy/pickle): BrainOmni/BrainTokenizer SELU trains on Gaudi, EEGSym pools with ``avg_pool2d``, FBCNet/FBMSNet/FBLightConvNet and LUNA run in float16, EEGMiner and AttnSleep deep-copy after training, Labram and NeuroRVQ pickle, SignalJEPA heads accept ``channel_strategy``, and tensors built in ``forward`` follow the input in CodeBrain, TCFormer, LUNA, MVPFormer, BrainOmni, ZUNA, DIVER1 and EEGDINO; float32 outputs unchanged (:gh:`1253` by `Bruno Aristimunha`_)
|
|
376
385
|
- :class:`braindecode.models.EEGSym` trains on Gaudi: its depthwise spatial ``Conv3d`` with a ``(1, 1, n_chans)`` kernel runs as a conv2d on a view, since the Gaudi graph compiler segfaulted on the depthwise conv3d backward; same state dict, outputs unchanged, gradients change by float rounding only (:gh:`1289` by `Bruno Aristimunha`_).
|
|
377
386
|
- :func:`braindecode.functional.hilbert_freq` returns float16 for float16 input (it
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.8.1.dev179960918"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/augmentation/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/base.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/bbci.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/bcicomp.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/bids/hub.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/chb_mit.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/collate.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/mne.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/moabb.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/nmt.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/registry.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/siena.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/utils.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datasets/xy.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datautil/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/datautil/util.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/eegneuralnet.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/functional/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/__init__.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/atcnet.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/axon.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/barista.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/bendr.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/biot.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/brainbert.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/brainmodule.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/brainomni.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/brant.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/cbramod.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/codebrain.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/config.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/contrawr.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/ctnet.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/dance.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/deepsleepnet.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/diver1.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eeg_clip.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegconformer.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegdino.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegitnet.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegminer.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegnet.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegnex.py
RENAMED
|
File without changes
|
{braindecode-1.8.1.dev179960918 → braindecode-1.8.1.dev180358634}/braindecode/models/eegpt.py
RENAMED
|
File without changes
|
|
File without changes
|