Braindecode 1.3.0.dev171854083__tar.gz → 1.3.0.dev172315966__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.
Files changed (153) hide show
  1. {braindecode-1.3.0.dev171854083/braindecode.egg-info → braindecode-1.3.0.dev172315966}/PKG-INFO +1 -1
  2. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/bendr.py +25 -0
  3. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/biot.py +29 -0
  4. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/labram.py +24 -0
  5. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/luna.py +55 -0
  6. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/reve.py +24 -0
  7. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/signal_jepa.py +27 -0
  8. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/samplers/ssl.py +1 -1
  9. braindecode-1.3.0.dev172315966/braindecode/version.py +1 -0
  10. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966/braindecode.egg-info}/PKG-INFO +1 -1
  11. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/api.rst +57 -5
  12. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/conf.py +1 -1
  13. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/whats_new.rst +1 -0
  14. braindecode-1.3.0.dev171854083/braindecode/version.py +0 -1
  15. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/LICENSE.txt +0 -0
  16. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/MANIFEST.in +0 -0
  17. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/NOTICE.txt +0 -0
  18. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/README.rst +0 -0
  19. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/__init__.py +0 -0
  20. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/augmentation/__init__.py +0 -0
  21. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/augmentation/base.py +0 -0
  22. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/augmentation/functional.py +0 -0
  23. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/augmentation/transforms.py +0 -0
  24. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/classifier.py +0 -0
  25. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/__init__.py +0 -0
  26. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/base.py +0 -0
  27. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/bbci.py +0 -0
  28. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/bcicomp.py +0 -0
  29. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/bids.py +0 -0
  30. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/bids_format.py +0 -0
  31. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/chb_mit.py +0 -0
  32. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/experimental.py +0 -0
  33. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/hub.py +0 -0
  34. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/hub_validation.py +0 -0
  35. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/mne.py +0 -0
  36. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/moabb.py +0 -0
  37. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/nmt.py +0 -0
  38. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/registry.py +0 -0
  39. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/siena.py +0 -0
  40. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
  41. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/sleep_physionet.py +0 -0
  42. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/tuh.py +0 -0
  43. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/utils.py +0 -0
  44. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datasets/xy.py +0 -0
  45. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datautil/__init__.py +0 -0
  46. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datautil/channel_utils.py +0 -0
  47. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datautil/hub_formats.py +0 -0
  48. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datautil/serialization.py +0 -0
  49. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/datautil/util.py +0 -0
  50. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/eegneuralnet.py +0 -0
  51. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/functional/__init__.py +0 -0
  52. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/functional/functions.py +0 -0
  53. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/functional/initialization.py +0 -0
  54. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/__init__.py +0 -0
  55. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/atcnet.py +0 -0
  56. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/attentionbasenet.py +0 -0
  57. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/attn_sleep.py +0 -0
  58. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/base.py +0 -0
  59. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/config.py +0 -0
  60. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/contrawr.py +0 -0
  61. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/ctnet.py +0 -0
  62. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/deep4.py +0 -0
  63. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/deepsleepnet.py +0 -0
  64. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/eegconformer.py +0 -0
  65. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/eeginception_erp.py +0 -0
  66. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/eeginception_mi.py +0 -0
  67. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/eegitnet.py +0 -0
  68. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/eegminer.py +0 -0
  69. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/eegnet.py +0 -0
  70. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/eegnex.py +0 -0
  71. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/eegsimpleconv.py +0 -0
  72. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/eegsym.py +0 -0
  73. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/eegtcnet.py +0 -0
  74. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/fbcnet.py +0 -0
  75. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/fblightconvnet.py +0 -0
  76. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/fbmsnet.py +0 -0
  77. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/hybrid.py +0 -0
  78. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/ifnet.py +0 -0
  79. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/medformer.py +0 -0
  80. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/msvtnet.py +0 -0
  81. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/patchedtransformer.py +0 -0
  82. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/sccnet.py +0 -0
  83. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/shallow_fbcsp.py +0 -0
  84. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/sinc_shallow.py +0 -0
  85. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
  86. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
  87. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/sparcnet.py +0 -0
  88. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/sstdpn.py +0 -0
  89. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/summary.csv +0 -0
  90. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/syncnet.py +0 -0
  91. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/tcn.py +0 -0
  92. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/tidnet.py +0 -0
  93. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/tsinception.py +0 -0
  94. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/usleep.py +0 -0
  95. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/models/util.py +0 -0
  96. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/modules/__init__.py +0 -0
  97. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/modules/activation.py +0 -0
  98. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/modules/attention.py +0 -0
  99. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/modules/blocks.py +0 -0
  100. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/modules/convolution.py +0 -0
  101. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/modules/filter.py +0 -0
  102. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/modules/layers.py +0 -0
  103. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/modules/linear.py +0 -0
  104. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/modules/parametrization.py +0 -0
  105. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/modules/stats.py +0 -0
  106. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/modules/util.py +0 -0
  107. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/modules/wrapper.py +0 -0
  108. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/preprocessing/__init__.py +0 -0
  109. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
  110. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/preprocessing/mne_preprocess.py +0 -0
  111. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/preprocessing/preprocess.py +0 -0
  112. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/preprocessing/util.py +0 -0
  113. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/preprocessing/windowers.py +0 -0
  114. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/regressor.py +0 -0
  115. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/samplers/__init__.py +0 -0
  116. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/samplers/base.py +0 -0
  117. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/training/__init__.py +0 -0
  118. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/training/callbacks.py +0 -0
  119. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/training/losses.py +0 -0
  120. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/training/scoring.py +0 -0
  121. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/util.py +0 -0
  122. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/visualization/__init__.py +0 -0
  123. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/visualization/confusion_matrices.py +0 -0
  124. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode/visualization/gradients.py +0 -0
  125. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode.egg-info/SOURCES.txt +0 -0
  126. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode.egg-info/dependency_links.txt +0 -0
  127. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode.egg-info/requires.txt +0 -0
  128. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/braindecode.egg-info/top_level.txt +0 -0
  129. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/Makefile +0 -0
  130. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/_templates/autosummary/class.rst +0 -0
  131. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/_templates/autosummary/function.rst +0 -0
  132. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/cite.rst +0 -0
  133. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/help.rst +0 -0
  134. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/index.rst +0 -0
  135. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/install/install.rst +0 -0
  136. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/install/install_pip.rst +0 -0
  137. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/install/install_source.rst +0 -0
  138. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/models/categorization/attention.rst +0 -0
  139. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/models/categorization/channel.rst +0 -0
  140. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/models/categorization/convolution.rst +0 -0
  141. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/models/categorization/filterbank.rst +0 -0
  142. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/models/categorization/gnn.rst +0 -0
  143. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/models/categorization/interpretable.rst +0 -0
  144. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/models/categorization/lbm.rst +0 -0
  145. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/models/categorization/recurrent.rst +0 -0
  146. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/models/categorization/spd.rst +0 -0
  147. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/models/models.rst +0 -0
  148. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/models/models_categorization.rst +0 -0
  149. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/models/models_table.rst +0 -0
  150. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/models/models_visualization.rst +0 -0
  151. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/docs/sg_execution_times.rst +0 -0
  152. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/pyproject.toml +0 -0
  153. {braindecode-1.3.0.dev171854083 → braindecode-1.3.0.dev172315966}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: braindecode
3
- Version: 1.3.0.dev171854083
3
+ Version: 1.3.0.dev172315966
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>
@@ -95,6 +95,31 @@ class BENDR(EEGModuleMixin, nn.Module):
95
95
  **self-supervised pre-training** on large, unlabeled EEG datasets (like TUEG) followed
96
96
  by subsequent fine-tuning on the specific downstream classification task [bendr]_.
97
97
 
98
+ .. important::
99
+ **Pre-trained Weights Available**
100
+
101
+ This model has pre-trained weights available on the Hugging Face Hub.
102
+ You can load them using:
103
+
104
+ .. code-block:: python
105
+
106
+ from braindecode.models import BENDR
107
+
108
+ # Load pre-trained model from Hugging Face Hub
109
+ # you can specify `n_outputs` for your downstream task
110
+ model = BENDR.from_pretrained("braindecode/braindecode-bendr", n_outputs=2)
111
+
112
+ To push your own trained model to the Hub:
113
+
114
+ .. code-block:: python
115
+
116
+ # After training your model
117
+ model.push_to_hub(
118
+ repo_id="username/my-bendr-model", commit_message="Upload trained BENDR model"
119
+ )
120
+
121
+ Requires installing ``braindecode[hug]`` for Hub integration.
122
+
98
123
  Parameters
99
124
  ----------
100
125
  encoder_h : int, default=512
@@ -41,6 +41,35 @@ class BIOT(EEGModuleMixin, nn.Module):
41
41
  linear layer that takes the output of the `BIOTEncoder` and outputs
42
42
  the classification probabilities.
43
43
 
44
+ .. important::
45
+ **Pre-trained Weights Available**
46
+
47
+ This model has pre-trained weights available on the Hugging Face Hub.
48
+ You can load them using:
49
+
50
+ .. code-block:: python
51
+
52
+ from braindecode.models import BIOT
53
+
54
+ # Load the original pre-trained model from Hugging Face Hub
55
+ # For 16-channel models:
56
+ model = BIOT.from_pretrained("braindecode/biot-pretrained-prest-16chs")
57
+
58
+ # For 18-channel models:
59
+ model = BIOT.from_pretrained("braindecode/biot-pretrained-shhs-prest-18chs")
60
+ model = BIOT.from_pretrained("braindecode/biot-pretrained-six-datasets-18chs")
61
+
62
+ To push your own trained model to the Hub:
63
+
64
+ .. code-block:: python
65
+
66
+ # After training your model
67
+ model.push_to_hub(
68
+ repo_id="username/my-biot-model", commit_message="Upload trained BIOT model"
69
+ )
70
+
71
+ Requires installing ``braindecode[hug]`` for Hub integration.
72
+
44
73
  .. versionadded:: 0.9
45
74
 
46
75
  Parameters
@@ -64,6 +64,30 @@ class Labram(EEGModuleMixin, nn.Module):
64
64
  - LayerNorm: Apply layer normalization to the data;
65
65
  - Linear: An head linear layer to transformer the data into classes.
66
66
 
67
+ .. important::
68
+ **Pre-trained Weights Available**
69
+
70
+ This model has pre-trained weights available on the Hugging Face Hub.
71
+ You can load them using:
72
+
73
+ .. code-block:: python
74
+
75
+ from braindecode.models import Labram
76
+
77
+ # Load pre-trained model from Hugging Face Hub
78
+ model = Labram.from_pretrained("braindecode/labram-pretrained")
79
+
80
+ To push your own trained model to the Hub:
81
+
82
+ .. code-block:: python
83
+
84
+ # After training your model
85
+ model.push_to_hub(
86
+ repo_id="username/my-labram-model", commit_message="Upload trained Labram model"
87
+ )
88
+
89
+ Requires installing ``braindecode[hug]`` for Hub integration.
90
+
67
91
  .. versionadded:: 0.9
68
92
 
69
93
 
@@ -44,6 +44,61 @@ class LUNA(EEGModuleMixin, nn.Module):
44
44
  3. Patch-wise Temporal Encoder (RoPE-based transformer)
45
45
  4. Decoder Heads (classification or reconstruction)
46
46
 
47
+ .. important::
48
+ **Pre-trained Weights Available**
49
+
50
+ This model has pre-trained weights available on the Hugging Face Hub
51
+ at `thorir/LUNA <https://huggingface.co/thorir/LUNA>`_.
52
+
53
+ Available model variants:
54
+
55
+ - **LUNA_base.safetensors** - Base model (embed_dim=64, num_queries=4, depth=8)
56
+ - **LUNA_large.safetensors** - Large model (embed_dim=96, num_queries=6, depth=10)
57
+ - **LUNA_huge.safetensors** - Huge model (embed_dim=128, num_queries=8, depth=24)
58
+
59
+ Example loading for fine-tuning:
60
+
61
+ .. code-block:: python
62
+
63
+ from huggingface_hub import hf_hub_download
64
+ from safetensors.torch import load_file
65
+ from braindecode.models import LUNA
66
+
67
+ # Download pre-trained weights
68
+ model_path = hf_hub_download(
69
+ repo_id="thorir/LUNA",
70
+ filename="LUNA_base.safetensors",
71
+ )
72
+
73
+ # Create model for classification (fine-tuning)
74
+ model = LUNA(
75
+ n_outputs=2, # Number of classes for your task
76
+ n_chans=22,
77
+ n_times=1000,
78
+ embed_dim=64,
79
+ num_queries=4,
80
+ depth=8,
81
+ )
82
+
83
+ # Load pre-trained encoder weights
84
+ state_dict = load_file(model_path)
85
+ # Apply key mapping for pretrained weights
86
+ mapping = model.mapping.copy()
87
+ mapping["cross_attn.temparature"] = "cross_attn.temperature"
88
+ mapped_state_dict = {mapping.get(k, k): v for k, v in state_dict.items()}
89
+ model.load_state_dict(mapped_state_dict, strict=False)
90
+
91
+ To push your own trained model to the Hub:
92
+
93
+ .. code-block:: python
94
+
95
+ # After training your model
96
+ model.push_to_hub(
97
+ repo_id="username/my-luna-model", commit_message="Upload trained LUNA model"
98
+ )
99
+
100
+ Requires installing ``braindecode[hug]`` for Hub integration.
101
+
47
102
  Parameters
48
103
  ----------
49
104
  patch_size : int
@@ -137,6 +137,30 @@ class REVE(EEGModuleMixin, nn.Module):
137
137
  - ``brain-bzh/reve-base``: 72M parameters, 512 embedding dim, 22 layers (~260 A100 GPU hours)
138
138
  - ``brain-bzh/reve-large``: ~400M parameters, 1250 embedding dim
139
139
 
140
+ .. important::
141
+ **Pre-trained Weights Available**
142
+
143
+ This model has pre-trained weights available on the Hugging Face Hub.
144
+ You can load them using:
145
+
146
+ .. code-block:: python
147
+
148
+ from braindecode.models import REVE
149
+
150
+ # Load pre-trained model from Hugging Face Hub
151
+ model = REVE.from_pretrained("brain-bzh/reve-base")
152
+
153
+ To push your own trained model to the Hub:
154
+
155
+ .. code-block:: python
156
+
157
+ # After training your model
158
+ model.push_to_hub(
159
+ repo_id="username/my-reve-model", commit_message="Upload trained REVE model"
160
+ )
161
+
162
+ Requires installing ``braindecode[hug]`` for Hub integration.
163
+
140
164
  .. rubric:: Usage
141
165
 
142
166
  .. code-block:: python
@@ -569,6 +569,33 @@ class SignalJEPA_PreLocal(_BaseSignalJEPA):
569
569
 
570
570
  .. versionadded:: 0.9
571
571
 
572
+ .. important::
573
+ **Pre-trained Weights Available**
574
+
575
+ This model has pre-trained weights available on the Hugging Face Hub.
576
+ You can load them using:
577
+
578
+ .. code-block:: python
579
+
580
+ from braindecode.models import SignalJEPA_PreLocal
581
+
582
+ # Load pre-trained model from Hugging Face Hub
583
+ model = SignalJEPA_PreLocal.from_pretrained(
584
+ "braindecode/SignalJEPA-PreLocal-pretrained"
585
+ )
586
+
587
+ To push your own trained model to the Hub:
588
+
589
+ .. code-block:: python
590
+
591
+ # After training your model
592
+ model.push_to_hub(
593
+ repo_id="username/my-sjepa-model",
594
+ commit_message="Upload trained SignalJEPA model",
595
+ )
596
+
597
+ Requires installing ``braindecode[hug]`` for Hub integration.
598
+
572
599
  Parameters
573
600
  ----------
574
601
  n_spat_filters : int
@@ -190,7 +190,7 @@ class DistributedRelativePositioningSampler(DistributedRecordingSampler):
190
190
  self.tau_max = np.inf if tau_max is None else tau_max
191
191
  self.same_rec_neg = same_rec_neg
192
192
 
193
- self.n_examples = n_examples // self.info.shape[0] * self.n_recordings
193
+ self.n_examples = n_examples * self.n_recordings // self.info.shape[0]
194
194
  warnings.warn(
195
195
  f"Rank {dist.get_rank()} - Number of datasets: {self.n_recordings}"
196
196
  )
@@ -0,0 +1 @@
1
+ __version__ = "1.3.0.dev172315966"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: braindecode
3
- Version: 1.3.0.dev171854083
3
+ Version: 1.3.0.dev172315966
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>
@@ -2,9 +2,9 @@
2
2
 
3
3
  .. _api_reference:
4
4
 
5
- =======================
6
- Braindece API Reference
7
- =======================
5
+ =========================
6
+ Braindecode API Reference
7
+ =========================
8
8
 
9
9
  .. automodule:: braindecode
10
10
  :no-members:
@@ -34,8 +34,60 @@ All the models are implemented as subclasses of :py:class:`EEGModuleMixin`, whic
34
34
  base class for all EEG models in Braindecode. The :class:`EEGModuleMixin` class
35
35
  provides a common interface for all EEG models and derivate variables names if necessary.
36
36
 
37
- Also, all models inherit from :class:`PyTorchModelHubMixin`, which provides functionality to
38
- save and load models from the Hugging Face Hub, if the ``braindecode[hug]`` package is installed.
37
+ .. important::
38
+ **Hugging Face Hub Integration**
39
+
40
+ All models in braindecode naturally possess the capability to push and pull from the
41
+ Hugging Face Hub through inheritance from :class:`PyTorchModelHubMixin`. This allows you to:
42
+
43
+ * **Load pre-trained models** from the Hub using ``Model.from_pretrained("repo_id")``
44
+ * **Share your trained models** with the community using ``model.push_to_hub("repo_id")``
45
+ * **Version control your models** with git-like versioning on the Hub
46
+
47
+ To enable this functionality, install braindecode with Hub support::
48
+
49
+ pip install braindecode[hug]
50
+
51
+ **Available pre-trained models:**
52
+
53
+ Some models have pre-trained weights available on the Hugging Face BrainDecode organization:
54
+
55
+ * :class:`BIOT` - Foundation model with pre-trained weights
56
+ * :class:`Labram` - Large Brain Model with pre-trained weights
57
+ * :class:`REVE` - EEG foundation model with pre-trained weights
58
+ * :class:`LUNA` - Universal EEG embedding model with pre-trained weights
59
+ * :class:`BENDR` - Foundation model with pre-trained weights
60
+ * :class:`SignalJEPA` - Self-supervised learning model with pre-trained weights
61
+
62
+ **Example - Loading a pre-trained model:**
63
+
64
+ .. code-block:: python
65
+
66
+ from braindecode.models import BIOT
67
+
68
+ # Load pre-trained BIOT model from Hugging Face Hub
69
+ model = BIOT.from_pretrained("braindecode/biot-pretrained-prest-16chs")
70
+
71
+ # Use for your EEG classification task
72
+ # ... your code here ...
73
+
74
+ **Example - Pushing your trained model:**
75
+
76
+ .. code-block:: python
77
+
78
+ from braindecode.models import EEGNeX
79
+
80
+ # Train your model
81
+ model = EEGNeX(n_chans=22, n_outputs=4, n_times=1000)
82
+ # ... training code ...
83
+
84
+ # Push to the Hub (requires huggingface-cli login)
85
+ model.push_to_hub(
86
+ repo_id="username/my-eegnex-model", commit_message="Initial model upload"
87
+ )
88
+
89
+ For more details, see the :class:`EEGModuleMixin` documentation and the
90
+ :ref:`hub-integration` tutorial.
39
91
 
40
92
  :note: Auto-generated Pydantic configs are available when the optional
41
93
  ``braindecode[pydantic]`` extra (which installs ``pydantic`` and ``numpydantic``)
@@ -293,7 +293,7 @@ sphinx_gallery_conf = {
293
293
  #
294
294
 
295
295
  html_theme = "pydata_sphinx_theme"
296
- switcher_version_match = "dev" if release.endswith("dev0") else version
296
+ switcher_version_match = "dev" if (release.endswith("dev0")) else version
297
297
  # Theme options are theme-specific and customize the look and feel of a theme
298
298
  # further. For a list of options available for each theme, see the
299
299
  # documentation.
@@ -22,6 +22,7 @@ Current 1.3 (dev)
22
22
 
23
23
  Enhancements
24
24
  ~~~~~~~~~~~~
25
+ - Adding Hugging Face Hub integration documentation with comprehensive examples for loading pre-trained models (:class:`braindecode.models.BIOT`, :class:`braindecode.models.Labram`, :class:`braindecode.models.REVE`, :class:`braindecode.models.LUNA`, :class:`braindecode.models.BENDR`, :class:`braindecode.models.SignalJEPA`) and pushing models to the Hub (:gh:`879` by `Bruno Aristimunha`_)
25
26
  - Adding :class:`braindecode.models.REVE` with comprehensive documentation covering architecture details, 4D positional encoding, and pretraining scale (:gh:`866` by `Jonathan Lys`_ )
26
27
  - Adding augmentation :class:`braindecode.augmentation.AmplitudeScale` (:gh:`848` by `Bruna Lopes`_)
27
28
  - Adding augmentation :class:`braindecode.augmentation.ChannelsReref` (:gh:`848` by `Bruna Lopes`_)
@@ -1 +0,0 @@
1
- __version__ = "1.3.0.dev171854083"