braindecode 2.1.0.dev4294968739__tar.gz → 2.1.0.dev4294968744__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-2.1.0.dev4294968739/braindecode.egg-info → braindecode-2.1.0.dev4294968744}/PKG-INFO +1 -1
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/functional/functions.py +20 -2
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/barista.py +3 -1
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/csbrain.py +2 -2
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/luna.py +8 -2
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/meta_neuromotor.py +1 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/neurorvq_tokenizer.py +11 -7
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/sccnet.py +1 -1
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/tinymyo.py +1 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/tsinception.py +1 -1
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/vemg2pose.py +1 -1
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/attention.py +27 -8
- braindecode-2.1.0.dev4294968744/braindecode/version.py +1 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744/braindecode.egg-info}/PKG-INFO +1 -1
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/conf.py +4 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/index.rst +11 -11
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/whats_new.rst +3 -0
- braindecode-2.1.0.dev4294968739/braindecode/version.py +0 -1
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/LICENSE.txt +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/MANIFEST.in +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/NOTICE.txt +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/README.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/augmentation/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/augmentation/base.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/augmentation/functional.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/augmentation/transforms.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/classifier.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/_notebook_viewer.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/base.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/bbci.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/bcicomp.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/bids/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/bids/datasets.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/bids/hub.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/bids/hub_format.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/bids/hub_io.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/bids/hub_validation.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/bids/iterable.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/chb_mit.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/collate.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/mne.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/moabb.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/nmt.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/registry.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/siena.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/sleep_physionet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/tuh.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/utils.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/xy.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datautil/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datautil/channel_utils.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datautil/hub_formats.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datautil/serialization.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datautil/util.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/eegneuralnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/functional/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/functional/_lfilter.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/functional/_real_dft.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/functional/attention.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/functional/channel_mask.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/functional/channels.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/functional/initialization.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/functional/patches.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/_summary.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/atcnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/attentionbasenet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/attn_sleep.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/axon.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/base.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/bbl.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/bendr.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/biot.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/brainbert.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/brainmodule.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/brainomni.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/brant.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/caresleepnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/cbramod.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/codebrain.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/config.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/contrawr.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/corteg.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/ctnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/dance.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/deep4.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/deepsleepnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/deepsoz.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/dgcnn.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/diver1.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/duin.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eeg_clip.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eegconformer.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eegdino.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eeginception_erp.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eeginception_mi.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eegitnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eegminer.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eegnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eegnex.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eegpt.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eegsimpleconv.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eegsym.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eegtcnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/emg2qwerty.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/epint.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/fbcnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/fblightconvnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/fbmsnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/fnirs4d.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/fnirs_cnn1d.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/fnirs_t.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/fnirsnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/gcnsnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/geonirs.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/guetschel2026.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/hybrid.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/ifnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/jung_mae.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/labram.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/mapa.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/medformer.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/meggpt.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/megxl.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/mirepnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/model.html.jinja +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/mscformer.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/msvtnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/mtrenirs.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/mvpformer.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/neuropose.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/neurorvq.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/nice.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/patchedtransformer.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/popt.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/pratibha2.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/reve.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/samba.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/seizure_transformer.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/sensingdynamics.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/shallow_fbcsp.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/signal_jepa.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/sinc_shallow.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/sleepfm.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/sparcnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/sstdpn.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/steegformer.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/summary.csv +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/syncnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/tccnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/tcformer.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/tcn.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/tfm_tokenizer.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/tidnet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/tmsanet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/usleep.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/util.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/zuna.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/activation.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/blocks.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/channels.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/convolution.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/dance_modules.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/filter.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/layers.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/linear.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/linear_attention.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/parametrization.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/quantization.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/seanet.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/spatial_temporal.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/stats.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/util.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/wrapper.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/preprocessing/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/preprocessing/mne_preprocess.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/preprocessing/preprocess.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/preprocessing/util.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/preprocessing/windowers.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/regressor.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/samplers/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/samplers/base.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/samplers/ssl.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/training/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/training/_trial_aggregation.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/training/callbacks.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/training/losses.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/training/scoring.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/util.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/visualization/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/visualization/activations.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/visualization/attribution.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/visualization/confusion_matrices.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/visualization/frequency.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/visualization/metrics.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/visualization/sanity.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/visualization/topology.py +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode.egg-info/SOURCES.txt +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode.egg-info/dependency_links.txt +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode.egg-info/requires.txt +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode.egg-info/top_level.txt +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/Makefile +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/_templates/autosummary/class.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/_templates/autosummary/class_in_subdir.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/_templates/autosummary/function.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/_templates/autosummary/function_in_subdir.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/agent_docs.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/api.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/cite.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/help.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/install/gaudi.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/install/install.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/install/install_pip.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/install/install_source.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/categorization/attention.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/categorization/channel.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/categorization/convolution.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/categorization/filterbank.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/categorization/gnn.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/categorization/interpretable.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/categorization/lbm.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/categorization/recurrent.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/categorization/spd.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/channel_strategies.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/models.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/models_categorization.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/models_table.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/models/models_visualization.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/docs/sg_execution_times.rst +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/pyproject.toml +0 -0
- {braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/setup.cfg +0 -0
{braindecode-2.1.0.dev4294968739/braindecode.egg-info → braindecode-2.1.0.dev4294968744}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 2.1.0.
|
|
3
|
+
Version: 2.1.0.dev4294968744
|
|
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>
|
|
@@ -63,6 +63,20 @@ def spectral_input(x: torch.Tensor, dtype: torch.dtype = torch.float32) -> torch
|
|
|
63
63
|
return x.to(torch.promote_types(x.dtype, dtype))
|
|
64
64
|
|
|
65
65
|
|
|
66
|
+
@torch.jit.unused
|
|
67
|
+
def _matmul_no_autocast(a: torch.Tensor, b: torch.Tensor) -> torch.Tensor:
|
|
68
|
+
with torch.autocast(device_type=a.device.type, enabled=False):
|
|
69
|
+
return torch.matmul(a, b)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def _spectral_matmul(a: torch.Tensor, b: torch.Tensor) -> torch.Tensor:
|
|
73
|
+
"""``a @ b`` in the input dtype: autocast would cast the real views of a
|
|
74
|
+
complex spectrum to bfloat16, which ``view_as_complex`` rejects."""
|
|
75
|
+
if torch.jit.is_scripting():
|
|
76
|
+
return torch.matmul(a, b)
|
|
77
|
+
return _matmul_no_autocast(a, b)
|
|
78
|
+
|
|
79
|
+
|
|
66
80
|
def fft_conv1d(
|
|
67
81
|
x: torch.Tensor, weight: torch.Tensor, bias: Optional[torch.Tensor] = None
|
|
68
82
|
) -> torch.Tensor:
|
|
@@ -109,13 +123,17 @@ def fft_conv1d(
|
|
|
109
123
|
# output columns are the (Re, Im) pairs of the result, read as complex
|
|
110
124
|
# without a copy (and without a costly backward).
|
|
111
125
|
w_mat = torch.view_as_real(torch.stack([w_f, w_f * 1j], 1)).flatten(1, 2)
|
|
112
|
-
y_f =
|
|
126
|
+
y_f = _spectral_matmul(
|
|
127
|
+
torch.view_as_real(x_f).permute(2, 0, 3, 1).flatten(2), w_mat.flatten(2)
|
|
128
|
+
)
|
|
113
129
|
y_f = torch.view_as_complex(y_f.unflatten(-1, [-1, 2]))
|
|
114
130
|
else:
|
|
115
131
|
# Forward only with fewer rows than twice the input channels: the
|
|
116
132
|
# doubled weight costs more than combining [Re x; Im x] @ [Re w, Im w].
|
|
117
133
|
x_f = x_f.permute(2, 0, 1)
|
|
118
|
-
p =
|
|
134
|
+
p = _spectral_matmul(
|
|
135
|
+
torch.cat([x_f.real, x_f.imag], 1), torch.view_as_real(w_f).flatten(2)
|
|
136
|
+
)
|
|
119
137
|
p = p.unflatten(1, [2, x.shape[0]]).unflatten(3, [-1, 2])
|
|
120
138
|
y_f = torch.complex(
|
|
121
139
|
p[:, 0, :, :, 0] - p[:, 1, :, :, 1], p[:, 0, :, :, 1] + p[:, 1, :, :, 0]
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/barista.py
RENAMED
|
@@ -563,6 +563,8 @@ class _SpatialEmbedding(nn.Module):
|
|
|
563
563
|
|
|
564
564
|
Per-sample indices give ``(batch, n_chans, d_model)``, one montage per sample.
|
|
565
565
|
"""
|
|
566
|
+
# The default indices were range-checked at construction.
|
|
567
|
+
given = indices is not None
|
|
566
568
|
if indices is None:
|
|
567
569
|
default = self.default_indices
|
|
568
570
|
if default is None:
|
|
@@ -586,7 +588,7 @@ class _SpatialEmbedding(nn.Module):
|
|
|
586
588
|
# Value check only in eager mode: it branches on tensor data, which
|
|
587
589
|
# TorchScript, torch.export and torch.compile graphs cannot express.
|
|
588
590
|
if not torch.jit.is_scripting():
|
|
589
|
-
if not torch.compiler.is_compiling():
|
|
591
|
+
if given and not torch.compiler.is_compiling():
|
|
590
592
|
n_slots = self.tables[0].num_embeddings
|
|
591
593
|
if bool((grid < 0).any()) or bool((grid >= n_slots).any()):
|
|
592
594
|
raise ValueError(
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/csbrain.py
RENAMED
|
@@ -546,10 +546,10 @@ class _CrossScaleTemporalEmbedding(nn.Module):
|
|
|
546
546
|
|
|
547
547
|
def forward(self, x):
|
|
548
548
|
batch, chans, time, d_model = x.shape
|
|
549
|
-
x = x.
|
|
549
|
+
x = x.reshape(batch * chans, d_model, time, 1)
|
|
550
550
|
fmaps = [conv(x) for conv in self.convs]
|
|
551
551
|
x = torch.cat(fmaps, dim=1)
|
|
552
|
-
return x.
|
|
552
|
+
return x.reshape(batch, chans, time, -1)
|
|
553
553
|
|
|
554
554
|
|
|
555
555
|
class _RegionEmbedding(nn.Module):
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/luna.py
RENAMED
|
@@ -900,7 +900,9 @@ class _ClassificationHeadWithQueries(nn.Module):
|
|
|
900
900
|
B, num_patches, embed_dim = x.shape
|
|
901
901
|
decoder_queries = self.learned_agg.repeat(x.shape[0], 1, 1)
|
|
902
902
|
|
|
903
|
-
x = self.decoder_attn(
|
|
903
|
+
x = self.decoder_attn(
|
|
904
|
+
query=decoder_queries, key=x, value=x, need_weights=False
|
|
905
|
+
)[0]
|
|
904
906
|
x = x[:, 0, :]
|
|
905
907
|
x = self.decoder_ffn(x)
|
|
906
908
|
return x
|
|
@@ -969,7 +971,11 @@ class _CrossAttentionBlock(nn.Module):
|
|
|
969
971
|
values = self.values_norm(x)
|
|
970
972
|
|
|
971
973
|
attention_out, attention_scores = self.cross_attention(
|
|
972
|
-
query=queries,
|
|
974
|
+
query=queries,
|
|
975
|
+
key=keys,
|
|
976
|
+
value=values,
|
|
977
|
+
key_padding_mask=key_padding_mask,
|
|
978
|
+
need_weights=False,
|
|
973
979
|
) # Shape: (batch_size*num_patches, num_queries, embed_dim)
|
|
974
980
|
attention_out = self.ffn(attention_out) + attention_out
|
|
975
981
|
|
|
@@ -1562,6 +1562,7 @@ class _MultiHeadAttention(nn.Module):
|
|
|
1562
1562
|
key=key,
|
|
1563
1563
|
value=value,
|
|
1564
1564
|
attn_mask=self.add_mask_axis(attn_mask),
|
|
1565
|
+
need_weights=False,
|
|
1565
1566
|
)
|
|
1566
1567
|
# Un-merge (batch * time) back to (batch, time) while keeping the
|
|
1567
1568
|
# singleton query axis the downstream conformer block expects.
|
|
@@ -85,7 +85,7 @@ class _EMAVectorQuantizer(nn.Module):
|
|
|
85
85
|
|
|
86
86
|
def _indices(self, vectors: Tensor) -> Tensor:
|
|
87
87
|
self.embedding.initialize(vectors)
|
|
88
|
-
weight = self.embedding.weight
|
|
88
|
+
weight = self.embedding.weight.to(vectors.dtype)
|
|
89
89
|
distances = vectors.square().sum(dim=1, keepdim=True)
|
|
90
90
|
distances = distances + weight.square().sum(dim=1)
|
|
91
91
|
# - 2 * vectors @ weight.T, accumulated in place by the GEMM (one pass less)
|
|
@@ -99,7 +99,7 @@ class _EMAVectorQuantizer(nn.Module):
|
|
|
99
99
|
z = F.normalize(z.permute(0, 2, 3, 1), dim=-1)
|
|
100
100
|
vectors = z.reshape(-1, z.shape[-1])
|
|
101
101
|
indices = self._indices(vectors)
|
|
102
|
-
quantized = F.embedding(indices, self.embedding.weight).view_as(z)
|
|
102
|
+
quantized = F.embedding(indices, self.embedding.weight.to(z.dtype)).view_as(z)
|
|
103
103
|
|
|
104
104
|
if self.training or self.statistic_code_usage:
|
|
105
105
|
with torch.no_grad():
|
|
@@ -112,7 +112,9 @@ class _EMAVectorQuantizer(nn.Module):
|
|
|
112
112
|
counts = ones.new_zeros(weight.shape[0]).index_add_(0, indices, ones)
|
|
113
113
|
if not torch.jit.is_scripting():
|
|
114
114
|
_all_reduce_sum(counts)
|
|
115
|
-
self.cluster_size.mul_(self.decay).add_(
|
|
115
|
+
self.cluster_size.mul_(self.decay).add_(
|
|
116
|
+
counts.to(self.cluster_size.dtype), alpha=1 - self.decay
|
|
117
|
+
)
|
|
116
118
|
if self.training:
|
|
117
119
|
safe_counts = counts.masked_fill(counts == 0, 1.0)
|
|
118
120
|
embed_sum = ones.new_zeros(weight.shape)
|
|
@@ -120,7 +122,9 @@ class _EMAVectorQuantizer(nn.Module):
|
|
|
120
122
|
if not torch.jit.is_scripting():
|
|
121
123
|
_all_reduce_sum(embed_sum)
|
|
122
124
|
means = F.normalize(embed_sum / safe_counts.unsqueeze(1), dim=-1)
|
|
123
|
-
means = torch.where(
|
|
125
|
+
means = torch.where(
|
|
126
|
+
counts[:, None] == 0, weight, means.to(weight.dtype)
|
|
127
|
+
)
|
|
124
128
|
weight.mul_(self.decay).add_(means, alpha=1 - self.decay)
|
|
125
129
|
weight.copy_(F.normalize(weight, dim=-1))
|
|
126
130
|
|
|
@@ -152,9 +156,9 @@ class _ResidualVectorQuantizer(nn.Module):
|
|
|
152
156
|
codes = []
|
|
153
157
|
for layer in self.layers:
|
|
154
158
|
indices = layer.encode(residual)
|
|
155
|
-
quantized = F.embedding(
|
|
156
|
-
|
|
157
|
-
)
|
|
159
|
+
quantized = F.embedding(
|
|
160
|
+
indices, layer.embedding.weight.to(residual.dtype)
|
|
161
|
+
).view(x.shape[0], x.shape[2], x.shape[3], x.shape[1])
|
|
158
162
|
residual = residual - quantized.permute(0, 3, 1, 2).contiguous()
|
|
159
163
|
codes.append(indices)
|
|
160
164
|
return torch.stack(codes)
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/sccnet.py
RENAMED
|
@@ -264,7 +264,7 @@ class SCCNet(EEGModuleMixin, nn.Module):
|
|
|
264
264
|
# Shape: (batch_size, n_filters_filt, 1, n_times_reduced_avg_pool)
|
|
265
265
|
x = self.activation(x)
|
|
266
266
|
# Shape: (batch_size, n_filters_filt, 1, n_times_reduced_avg_pool)
|
|
267
|
-
x = x.
|
|
267
|
+
x = x.reshape(x.size(0), -1)
|
|
268
268
|
# Shape: (batch_size, n_filters_filt*n_times_reduced_avg_pool)
|
|
269
269
|
x = self.final_layer(x)
|
|
270
270
|
# Shape: (batch_size, n_outputs)
|
|
@@ -220,7 +220,7 @@ class TSception(EEGModuleMixin, nn.Module):
|
|
|
220
220
|
s_out = self.batch_spatial_lay(s_out)
|
|
221
221
|
|
|
222
222
|
# Flatten and apply final layers
|
|
223
|
-
s_out = s_out.
|
|
223
|
+
s_out = s_out.reshape(s_out.size(0), -1)
|
|
224
224
|
output = self.dense_layer(s_out)
|
|
225
225
|
output = self.final_layer(output)
|
|
226
226
|
return output
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/modules/attention.py
RENAMED
|
@@ -204,7 +204,7 @@ class FCA(nn.Module):
|
|
|
204
204
|
)
|
|
205
205
|
self.fc = nn.Sequential(
|
|
206
206
|
nn.Linear(in_channels, in_channels // reduction_rate, bias=False),
|
|
207
|
-
nn.ReLU(
|
|
207
|
+
nn.ReLU(),
|
|
208
208
|
nn.Linear(in_channels // reduction_rate, in_channels, bias=False),
|
|
209
209
|
nn.Sigmoid(),
|
|
210
210
|
)
|
|
@@ -893,6 +893,7 @@ class TimmAttention(nn.Module):
|
|
|
893
893
|
proj_drop: float = 0.0,
|
|
894
894
|
exact: bool = False,
|
|
895
895
|
rotary_runs: Optional[int] = None,
|
|
896
|
+
rotary_run_len: Optional[int] = None,
|
|
896
897
|
):
|
|
897
898
|
super().__init__()
|
|
898
899
|
if not 1 <= num_heads <= dim:
|
|
@@ -903,11 +904,23 @@ class TimmAttention(nn.Module):
|
|
|
903
904
|
self.head_dim = dim // num_heads
|
|
904
905
|
if rotary_runs is not None and rotary_runs < 1:
|
|
905
906
|
raise ValueError(f"rotary_runs must be positive, got {rotary_runs}.")
|
|
907
|
+
if rotary_run_len is not None and rotary_run_len < 1:
|
|
908
|
+
raise ValueError(f"rotary_run_len must be positive, got {rotary_run_len}.")
|
|
906
909
|
if rotary_runs is not None and self.head_dim % 2:
|
|
907
910
|
raise ValueError(
|
|
908
911
|
f"head_dim ({self.head_dim}) must be even: RoPE rotates in pairs."
|
|
909
912
|
)
|
|
910
913
|
self.rotary_runs = rotary_runs
|
|
914
|
+
# cos and sin of the build length, so forward does not rebuild them
|
|
915
|
+
cos = sin = torch.empty(0, self.head_dim)
|
|
916
|
+
if rotary_runs is not None and rotary_run_len is not None:
|
|
917
|
+
positions = torch.arange(rotary_run_len, dtype=torch.float32)
|
|
918
|
+
angles = rotary_angles(
|
|
919
|
+
positions.repeat(rotary_runs), rotary_frequencies(self.head_dim)
|
|
920
|
+
)
|
|
921
|
+
cos, sin = angles.cos(), angles.sin()
|
|
922
|
+
self.register_buffer("_rotary_cos", cos, persistent=False)
|
|
923
|
+
self.register_buffer("_rotary_sin", sin, persistent=False)
|
|
911
924
|
all_head_dim = self.head_dim * num_heads
|
|
912
925
|
self.scale = self.head_dim**-0.5
|
|
913
926
|
self.exact = exact
|
|
@@ -947,13 +960,19 @@ class TimmAttention(nn.Module):
|
|
|
947
960
|
)
|
|
948
961
|
# Rotate in float32 at least, as the reference implementations do
|
|
949
962
|
dtype = torch.promote_types(q.dtype, torch.float32)
|
|
950
|
-
|
|
951
|
-
n_tokens
|
|
952
|
-
)
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
963
|
+
if self._rotary_cos.dtype == dtype == torch.float32 and (
|
|
964
|
+
n_tokens == self._rotary_cos.shape[0]
|
|
965
|
+
):
|
|
966
|
+
cos, sin = self._rotary_cos, self._rotary_sin
|
|
967
|
+
else:
|
|
968
|
+
positions = torch.arange(
|
|
969
|
+
n_tokens // rotary_runs, device=q.device, dtype=dtype
|
|
970
|
+
).repeat(rotary_runs)
|
|
971
|
+
angles = rotary_angles(
|
|
972
|
+
positions,
|
|
973
|
+
rotary_frequencies(self.head_dim, device=q.device, dtype=dtype),
|
|
974
|
+
)
|
|
975
|
+
cos, sin = angles.cos(), angles.sin()
|
|
957
976
|
return (
|
|
958
977
|
apply_rotary(q.to(dtype), cos, sin).to(q.dtype),
|
|
959
978
|
apply_rotary(k.to(dtype), cos, sin).to(k.dtype),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.0.dev4294968744"
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744/braindecode.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 2.1.0.
|
|
3
|
+
Version: 2.1.0.dev4294968744
|
|
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>
|
|
@@ -541,11 +541,15 @@ sitemap_excludes = [
|
|
|
541
541
|
]
|
|
542
542
|
|
|
543
543
|
html_redirects = {
|
|
544
|
+
"auto_examples/datasets_io/plot_hub_integration.html": "hub_integration.html",
|
|
544
545
|
"user_guide/channel_strategies.html": "../models/channel_strategies.html",
|
|
545
546
|
"user_guide/cropped_inference.html": (
|
|
546
547
|
"../auto_examples/model_building/"
|
|
547
548
|
"plot_bcic_iv_2a_moabb_cropped.html#cropped-inference"
|
|
548
549
|
),
|
|
550
|
+
"auto_examples/advanced_training/bcic_iv_4_ecog_cropped.html": (
|
|
551
|
+
"plot_bcic_iv_4_ecog_cropped.html"
|
|
552
|
+
),
|
|
549
553
|
}
|
|
550
554
|
|
|
551
555
|
# --- Open Graph / Twitter Card / meta description ---
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
<div class="hf-pillars">
|
|
253
253
|
<a class="hf-pillar" href="models/categorization/lbm.html">
|
|
254
254
|
<span class="hf-pillar-kicker bd-mono">MODELS · 48 FOUNDATION WEIGHTS</span>
|
|
255
|
-
<strong>EEGPT,
|
|
255
|
+
<strong>LaBraM, EEGPT, CBraMod, REVE, SleepFM, DuIN & MEGXL</strong>
|
|
256
256
|
<span class="hf-pillar-sub">Readable JSON configs and parameter-level weight provenance, benchmarked under OpenEEG-Bench.</span>
|
|
257
257
|
</a>
|
|
258
258
|
<a class="hf-pillar" href="https://eegdash.org/dataset_summary.html" target="_blank" rel="noopener">
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
<div class="output-pane output-pane-models">
|
|
287
287
|
<div class="output-toolbar bd-mono">
|
|
288
288
|
<span class="copy-wrap">
|
|
289
|
-
<button type="button" class="output-copy-btn" data-copy="from braindecode.models import
|
|
289
|
+
<button type="button" class="output-copy-btn" data-copy="from braindecode.models import REVE model = REVE.from_pretrained( "brain-bzh/reve-base", n_outputs=4, n_times=800, chs_info=raw.info["chs"], ) probs = model(X_test).softmax(dim=-1)" aria-label="Copy REVE from_pretrained code">
|
|
290
290
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
|
|
291
291
|
<span>Copy Code</span>
|
|
292
292
|
</button>
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
<span>Python · safetensors</span>
|
|
296
296
|
</div>
|
|
297
297
|
<div class="output-terminal">
|
|
298
|
-
<pre class="repl-code bd-mono" tabindex="0"><code><span class="cl"><span class="tok-kw">>>></span> <span class="tok-kw">from</span> braindecode.models <span class="tok-kw">import</span> <span class="tok-cls">
|
|
298
|
+
<pre class="repl-code bd-mono" tabindex="0"><code><span class="cl"><span class="tok-kw">>>></span> <span class="tok-kw">from</span> braindecode.models <span class="tok-kw">import</span> <span class="tok-cls">REVE</span></span><span class="cl"><span class="tok-kw">>>></span> model = <span class="tok-cls">REVE</span>.<span class="tok-fn">from_pretrained</span>(</span><span class="cl">... <span class="tok-str">"brain-bzh/reve-base"</span>,</span><span class="cl">... <span class="tok-attr">n_outputs</span>=<span class="tok-num">4</span>,</span><span class="cl">... <span class="tok-attr">n_times</span>=<span class="tok-num">800</span>,</span><span class="cl">... <span class="tok-attr">chs_info</span>=raw.info[<span class="tok-str">"chs"</span>],</span><span class="cl">... )</span><span class="cl"><span class="tok-kw">>>></span> model(X_test).<span class="tok-fn">softmax</span>(<span class="tok-attr">dim</span>=-<span class="tok-num">1</span>)[:<span class="tok-num">3</span>]</span><span class="cl">tensor([[<span class="tok-num">0.92</span>, <span class="tok-num">0.03</span>, <span class="tok-num">0.03</span>, <span class="tok-num">0.02</span>],</span><span class="cl"> [<span class="tok-num">0.04</span>, <span class="tok-num">0.89</span>, <span class="tok-num">0.05</span>, <span class="tok-num">0.02</span>],</span><span class="cl"> [<span class="tok-num">0.02</span>, <span class="tok-num">0.04</span>, <span class="tok-num">0.91</span>, <span class="tok-num">0.03</span>]])</span></code></pre>
|
|
299
299
|
</div>
|
|
300
300
|
</div>
|
|
301
301
|
|
|
@@ -465,11 +465,11 @@
|
|
|
465
465
|
</div>
|
|
466
466
|
<p class="cap-stream bd-mono">19–128 ch @ 128–512 Hz · C3 Cz C4 Fpz-Cz Pz-Oz · MNE Raw / BIDS / EDF</p>
|
|
467
467
|
<div class="cap-links bd-mono">
|
|
468
|
-
<a href="generated/braindecode.models.EEGPT.html">EEGPT</a>
|
|
469
468
|
<a href="generated/braindecode.models.Labram.html">LaBraM</a>
|
|
469
|
+
<a href="generated/braindecode.models.EEGPT.html">EEGPT</a>
|
|
470
470
|
<a href="generated/braindecode.models.REVE.html">REVE</a>
|
|
471
|
-
<a href="generated/braindecode.models.EEGNeX.html">EEGNeX</a>
|
|
472
471
|
<a href="generated/braindecode.models.SleepFM.html">SleepFM</a>
|
|
472
|
+
<a href="generated/braindecode.models.EEGNeX.html">EEGNeX</a>
|
|
473
473
|
</div>
|
|
474
474
|
</div>
|
|
475
475
|
|
|
@@ -480,11 +480,11 @@
|
|
|
480
480
|
</div>
|
|
481
481
|
<p class="cap-stream bd-mono">64–306 sensors @ 500–2048 Hz · 3D stereotactic shafts & OPM/SQUID arrays</p>
|
|
482
482
|
<div class="cap-links bd-mono">
|
|
483
|
-
<a href="generated/braindecode.models.DuIN.html">DuIN</a>
|
|
484
|
-
<a href="generated/braindecode.models.PopulationTransformer.html">PopT</a>
|
|
485
483
|
<a href="generated/braindecode.models.BrainBERT.html">BrainBERT</a>
|
|
486
|
-
<a href="generated/braindecode.models.MEGXL.html">MEGXL</a>
|
|
487
484
|
<a href="generated/braindecode.models.BrainOmni.html">BrainOmni</a>
|
|
485
|
+
<a href="generated/braindecode.models.PopulationTransformer.html">PopT</a>
|
|
486
|
+
<a href="generated/braindecode.models.DuIN.html">DuIN</a>
|
|
487
|
+
<a href="generated/braindecode.models.MEGXL.html">MEGXL</a>
|
|
488
488
|
</div>
|
|
489
489
|
</div>
|
|
490
490
|
|
|
@@ -495,11 +495,11 @@
|
|
|
495
495
|
</div>
|
|
496
496
|
<p class="cap-stream bd-mono">HbO/HbR optode pairs @ 10 Hz · 2 kHz motor-unit wrist arrays</p>
|
|
497
497
|
<div class="cap-links bd-mono">
|
|
498
|
-
<a href="generated/braindecode.models.GeoNIRS.html">GeoNIRS</a>
|
|
499
|
-
<a href="generated/braindecode.models.MtReNIRS.html">MtReNIRS</a>
|
|
500
|
-
<a href="generated/braindecode.models.TinyMyo.html">TinyMyo</a>
|
|
501
498
|
<a href="generated/braindecode.models.MetaNeuromotorHand.html">MetaNeuromotor</a>
|
|
502
499
|
<a href="generated/braindecode.models.VEMG2Pose.html">VEMG2Pose</a>
|
|
500
|
+
<a href="generated/braindecode.models.TinyMyo.html">TinyMyo</a>
|
|
501
|
+
<a href="generated/braindecode.models.GeoNIRS.html">GeoNIRS</a>
|
|
502
|
+
<a href="generated/braindecode.models.MtReNIRS.html">MtReNIRS</a>
|
|
503
503
|
</div>
|
|
504
504
|
</div>
|
|
505
505
|
</div>
|
|
@@ -28,6 +28,9 @@ Current 2.1.0 (GitHub)
|
|
|
28
28
|
Enhancements
|
|
29
29
|
============
|
|
30
30
|
|
|
31
|
+
- LUNA and MetaNeuromotorHand skip the unused attention weights (outputs move by at most 2e-6), TinyMyo builds its
|
|
32
|
+
rotary table once, BaRISTA no longer syncs with the host in eval, and SCCNet, TSception, CSBrain (channels_last),
|
|
33
|
+
EEGInceptionMI, EEGNeX and NeuroRVQTokenizer (bfloat16 autocast) no longer raise (:gh:`1786` by `Bruno Aristimunha`_).
|
|
31
34
|
- Add :meth:`braindecode.models.EEGModuleMixin.adapt_input` to adapt a built model, in
|
|
32
35
|
place and with unchanged ``state_dict`` keys, to another EEG montage or sampling
|
|
33
36
|
rate; ``get_config`` saves the adaptation (by `Bruno Aristimunha`_).
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.1.0.dev4294968739"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/augmentation/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/classifier.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/base.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/bbci.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/bcicomp.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/bids/hub.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/chb_mit.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/collate.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/mne.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/moabb.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/nmt.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/registry.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/siena.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/tuh.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/utils.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datasets/xy.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datautil/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/datautil/util.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/eegneuralnet.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/__init__.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/_summary.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/atcnet.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/attn_sleep.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/axon.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/base.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/bbl.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/bendr.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/biot.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/brainbert.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/brainomni.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/brant.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/cbramod.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/codebrain.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/config.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/contrawr.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/corteg.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/ctnet.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/dance.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/deep4.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/deepsoz.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/dgcnn.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/diver1.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/duin.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eeg_clip.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968739 → braindecode-2.1.0.dev4294968744}/braindecode/models/eegdino.py
RENAMED
|
File without changes
|