-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapi.html
More file actions
2002 lines (1818 loc) · 197 KB
/
api.html
File metadata and controls
2002 lines (1818 loc) · 197 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en" data-content_root="./" data-theme="light">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta property="og:title" content="Braindecode API Reference" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://braindecode.org/dev/api.html" />
<meta property="og:site_name" content="Braindecode" />
<meta property="og:description" content="Models: Model zoo availables in braindecode. The models are implemented as PyTorch torch.nn.Module and can be used for various EEG decoding ways tasks. All the models have the convention of having ..." />
<meta property="og:image" content="https://braindecode.org/dev/_static/braindecode_long.svg" />
<meta property="og:image:alt" content="Braindecode — open-source PyTorch toolbox for decoding raw EEG, ECoG and MEG" />
<meta name="description" content="Models: Model zoo availables in braindecode. The models are implemented as PyTorch torch.nn.Module and can be used for various EEG decoding ways tasks. All the models have the convention of having ..." />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@braindecode" />
<title>Braindecode API Reference — Braindecode 1.6.1dev0 documentation</title>
<script data-cfasync="false">
document.documentElement.dataset.mode = localStorage.getItem("mode") || "light";
document.documentElement.dataset.theme = localStorage.getItem("theme") || "light";
</script>
<!--
this give us a css class that will be invisible only if js is disabled
-->
<noscript>
<style>
.pst-js-only { display: none !important; }
</style>
</noscript>
<!-- Loaded before other Sphinx assets -->
<link href="_static/styles/theme.css?digest=0790524f97105ba85085" rel="stylesheet" />
<link href="_static/styles/pydata-sphinx-theme.css?digest=0790524f97105ba85085" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
<link rel="stylesheet" type="text/css" href="_static/sg_gallery.css?v=fd6457a4" />
<link rel="stylesheet" type="text/css" href="_static/sg_gallery-binder.css?v=f4aeca0c" />
<link rel="stylesheet" type="text/css" href="_static/sg_gallery-dataframe.css?v=2082cf3c" />
<link rel="stylesheet" type="text/css" href="_static/sg_gallery-rendered-html.css?v=1277b6f3" />
<link rel="stylesheet" type="text/css" href="_static/sphinx-design.min.css?v=95c83b7e" />
<link rel="stylesheet" type="text/css" href="_static/style.css?v=f3e3feaa" />
<!-- So that users can add custom icons -->
<script defer src="_static/scripts/fontawesome.js?digest=0790524f97105ba85085"></script>
<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=0790524f97105ba85085" />
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=0790524f97105ba85085" />
<script src="_static/documentation_options.js?v=bc6b04ce"></script>
<script src="_static/doctools.js?v=fd6eb6e6"></script>
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
<script src="_static/sg-tags.js?v=d80f6fa4"></script>
<script src="_static/design-tabs.js?v=f930bc37"></script>
<script defer="defer" src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"></script>
<script>DOCUMENTATION_OPTIONS.pagename = 'api';</script>
<script>
DOCUMENTATION_OPTIONS.theme_version = '0.18.0';
DOCUMENTATION_OPTIONS.theme_switcher_json_url = 'https://braindecode.org/stable/_static/versions.json';
DOCUMENTATION_OPTIONS.theme_switcher_version_match = 'dev';
DOCUMENTATION_OPTIONS.show_version_warning_banner =
false;
</script>
<script>DOCUMENTATION_OPTIONS.search_as_you_type = false;</script>
<link rel="canonical" href="https://braindecode.org/dev/api.html" />
<link rel="icon" href="_static/braindecode_symbol.png"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="braindecode.models.EEGModuleMixin" href="generated/braindecode.models.EEGModuleMixin.html" />
<link rel="prev" title="Visualization" href="models/models_visualization.html" />
<!-- Google Tag Manager (single analytics entry point — drives any GA4 / GTAG
configured inside the GTM container; do not add a second gtag here).
Honors the Do-Not-Track signal so privacy-conscious users opt out. -->
<script>(function(w,d,s,l,i){
if (w.doNotTrack=='1' || w.navigator.doNotTrack=='1' || w.navigator.doNotTrack=='yes') return;
w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-NWDKLVNR');</script>
<!-- End Google Tag Manager -->
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
<meta name="docsearch:version" content="1.6" />
<script src="_static/searchtools.js"></script>
<script src="_static/language_data.js"></script>
<script src="searchindex.js"></script>
</head>
<body data-default-mode="light">
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
<div id="pst-scroll-pixel-helper"></div>
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
<dialog id="pst-search-dialog">
<form class="bd-search d-flex align-items-center"
action="search.html"
method="get">
<i class="fa-solid fa-magnifying-glass"></i>
<input type="search"
class="form-control"
name="q"
placeholder="Search the docs ..."
aria-label="Search the docs ..."
autocomplete="off"
autocorrect="off"
autocapitalize="off"
spellcheck="false"/>
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
</form>
</dialog>
<div class="pst-async-banner-revealer d-none">
<aside
id="bd-header-version-warning"
class="d-none d-print-none"
aria-label="Version warning"
></aside>
</div>
<aside class="bd-header-announcement" aria-label="Announcement">
<div class="bd-header-announcement__content">
<strong>Using Braindecode in academic work?</strong>
<a class="braindecode-announcement-cta" href="cite.html">
Cite Braindecode
</a>
<span class="braindecode-announcement-secondary">
DOI:
<a href="https://doi.org/10.5281/zenodo.17699192">10.5281/zenodo.17699192</a>
</span>
</div>
</aside>
<header id="pst-header" class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
<div class="bd-header__inner bd-page-width">
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
<span class="fa-solid fa-bars"></span>
</button>
<div class="col-lg-3 navbar-header-items__start">
<div class="navbar-item">
<a class="navbar-brand logo" href="index.html">
<img src="_static/braindecode_long.svg" class="logo__image only-light" alt="Braindecode Logo"/>
<img src="_static/braindecode_long.svg" class="logo__image only-dark pst-js-only" alt="Braindecode Logo"/>
</a></div>
</div>
<div class="col-lg-9 navbar-header-items">
<div class="me-auto navbar-header-items__center">
<div class="navbar-item">
<nav>
<ul class="bd-navbar-elements navbar-nav">
<li class="nav-item ">
<a class="nav-link nav-internal" href="install/install.html">
Install
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="auto_examples/index.html">
Tutorial and Examples
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="models/models.html">
Models
</a>
</li>
<li class="nav-item current active">
<a class="nav-link nav-internal" href="#">
API
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="whats_new.html">
What's new
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="cite.html">
Cite
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="help.html">
Get help
</a>
</li>
</ul>
</nav></div>
</div>
<div class="navbar-header-items__end">
<div class="navbar-item navbar-persistent--container">
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
<i class="fa-solid fa-magnifying-glass"></i>
<span class="search-button__default-text">Search</span>
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
</button>
</div>
<div class="navbar-item">
<div class="theme-switch-container dropdown pst-js-only" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Color mode">
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button dropdown-toggle" aria-label="Color mode" data-bs-toggle="dropdown">
<i class="theme-switch fa-solid fa-sun fa-lg fa-fw" data-mode="light" title="Light"></i>
<i class="theme-switch fa-solid fa-moon fa-lg fa-fw" data-mode="dark" title="Dark"></i>
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg fa-fw" data-mode="auto" title="System Settings"></i>
</button>
<ul class="dropdown-menu dropdown-menu-end">
<li><button class="dropdown-item d-flex align-items-center theme-change-button" data-mode="auto"><i class="fa-solid fa-circle-half-stroke fa-lg fa-fw me-1"></i>System Settings</button></li>
<li><button class="dropdown-item d-flex align-items-center theme-change-button" data-mode="light"><i class="fa-solid fa-sun fa-lg fa-fw me-1"></i>Light</button></li>
<li><button class="dropdown-item d-flex align-items-center theme-change-button" data-mode="dark"><i class="fa-solid fa-moon fa-lg fa-fw me-1"></i>Dark</button></li>
</ul>
</div></div>
<div class="navbar-item">
<div class="version-switcher__container dropdown pst-js-only">
<button id="pst-version-switcher-button-2"
type="button"
class="version-switcher__button btn btn-sm dropdown-toggle"
data-bs-toggle="dropdown"
aria-haspopup="listbox"
aria-controls="pst-version-switcher-list-2"
aria-label="Version switcher list"
>
Choose version <!-- this text may get changed later by javascript -->
<span class="caret"></span>
</button>
<div id="pst-version-switcher-list-2"
class="version-switcher__menu dropdown-menu list-group-flush py-0"
role="listbox" aria-labelledby="pst-version-switcher-button-2">
<!-- dropdown will be populated by javascript on page load -->
</div>
</div></div>
</div>
</div>
<div class="navbar-persistent--mobile">
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
<i class="fa-solid fa-magnifying-glass"></i>
<span class="search-button__default-text">Search</span>
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
</button>
</div>
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
<span class="fa-solid fa-outdent"></span>
</button>
</div>
</header>
<div class="bd-container">
<div class="bd-container__inner bd-page-width">
<dialog id="pst-primary-sidebar-modal"></dialog>
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar hide-on-wide">
<div class="sidebar-header-items sidebar-primary__section">
<div class="sidebar-header-items__center">
<div class="navbar-item">
<nav>
<ul class="bd-navbar-elements navbar-nav">
<li class="nav-item ">
<a class="nav-link nav-internal" href="install/install.html">
Install
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="auto_examples/index.html">
Tutorial and Examples
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="models/models.html">
Models
</a>
</li>
<li class="nav-item current active">
<a class="nav-link nav-internal" href="#">
API
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="whats_new.html">
What's new
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="cite.html">
Cite
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="help.html">
Get help
</a>
</li>
</ul>
</nav></div>
</div>
<div class="sidebar-header-items__end">
<div class="navbar-item">
<div class="theme-switch-container dropdown pst-js-only" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Color mode">
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button dropdown-toggle" aria-label="Color mode" data-bs-toggle="dropdown">
<i class="theme-switch fa-solid fa-sun fa-lg fa-fw" data-mode="light" title="Light"></i>
<i class="theme-switch fa-solid fa-moon fa-lg fa-fw" data-mode="dark" title="Dark"></i>
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg fa-fw" data-mode="auto" title="System Settings"></i>
</button>
<ul class="dropdown-menu dropdown-menu-end">
<li><button class="dropdown-item d-flex align-items-center theme-change-button" data-mode="auto"><i class="fa-solid fa-circle-half-stroke fa-lg fa-fw me-1"></i>System Settings</button></li>
<li><button class="dropdown-item d-flex align-items-center theme-change-button" data-mode="light"><i class="fa-solid fa-sun fa-lg fa-fw me-1"></i>Light</button></li>
<li><button class="dropdown-item d-flex align-items-center theme-change-button" data-mode="dark"><i class="fa-solid fa-moon fa-lg fa-fw me-1"></i>Dark</button></li>
</ul>
</div></div>
<div class="navbar-item">
<div class="version-switcher__container dropdown pst-js-only">
<button id="pst-version-switcher-button-3"
type="button"
class="version-switcher__button btn btn-sm dropdown-toggle"
data-bs-toggle="dropdown"
aria-haspopup="listbox"
aria-controls="pst-version-switcher-list-3"
aria-label="Version switcher list"
>
Choose version <!-- this text may get changed later by javascript -->
<span class="caret"></span>
</button>
<div id="pst-version-switcher-list-3"
class="version-switcher__menu dropdown-menu list-group-flush py-0"
role="listbox" aria-labelledby="pst-version-switcher-button-3">
<!-- dropdown will be populated by javascript on page load -->
</div>
</div></div>
</div>
</div>
<div class="sidebar-primary-items__end sidebar-primary__section">
<div class="sidebar-primary-item">
<div id="ethical-ad-placement"
class="flat"
data-ea-publisher="readthedocs"
data-ea-type="readthedocs-sidebar"
data-ea-manual="true">
</div></div>
</div>
</div>
<main id="main-content" class="bd-main" role="main">
<div class="bd-content">
<div class="bd-article-container">
<div class="bd-header-article d-print-none">
<div class="header-article-items header-article__inner">
<div class="header-article-items__start">
<div class="header-article-item">
<nav aria-label="Breadcrumb" class="d-print-none">
<ul class="bd-breadcrumbs">
<li class="breadcrumb-item breadcrumb-home">
<a href="index.html" class="nav-link" aria-label="Home">
<i class="fa-solid fa-home"></i>
</a>
</li>
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">Braindecode API Reference</span></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<div>
<section id="module-braindecode">
<span id="braindecode-api-reference"></span><span id="api-reference"></span><h1>Braindecode API Reference<a class="headerlink" href="#module-braindecode" title="Link to this heading">#</a></h1>
<section id="models">
<h2>Models<a class="headerlink" href="#models" title="Link to this heading">#</a></h2>
<p>Model zoo availables in braindecode. The models are implemented as <code class="docutils literal notranslate"><span class="pre">PyTorch</span></code>
<a class="reference external" href="https://docs.pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module" title="(in PyTorch v2.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">torch.nn.Module</span></code></a> and can be used for various EEG decoding ways tasks.</p>
<p>All the models have the convention of having the signal related parameters named the
same way, following the braindecode’s standards:</p>
<ul class="simple">
<li><p><span class="fa fa-shapes"></span> <code class="docutils literal notranslate"><span class="pre">n_outputs</span></code>: Number of labels or outputs of the model.</p></li>
<li><p><span class="fa fa-wave-square"></span> <code class="docutils literal notranslate"><span class="pre">n_chans</span></code>: Number of EEG channels.</p></li>
<li><p><span class="fa fa-clock"></span> <code class="docutils literal notranslate"><span class="pre">n_times</span></code>: Number of time points of the input window.</p></li>
<li><p><span class="fa fa-wifi"></span> <code class="docutils literal notranslate"><span class="pre">sfreq</span></code>: Sampling frequency of the EEG recordings.</p></li>
<li><p>(<span class="fa fa-clock"></span>/ <span class="fa fa-wifi"></span>) <code class="docutils literal notranslate"><span class="pre">input_window_seconds</span></code>: Length of the input window in
seconds.</p></li>
<li><p><span class="fa fa-info-circle"></span> <code class="docutils literal notranslate"><span class="pre">chs_info</span></code>: Information about each individual EEG channel. Refer
to <a class="reference external" href="https://mne.tools/stable/generated/mne.Info.html#mne.Info" title="(in MNE v1.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">mne.Info</span></code></a> (see its <code class="docutils literal notranslate"><span class="pre">"chs"</span></code> field for details).</p></li>
</ul>
<p>All the models assume that the input data is a 3D tensor of shape <code class="docutils literal notranslate"><span class="pre">(batch_size,</span>
<span class="pre">n_chans,</span> <span class="pre">n_times)</span></code>, and some models also accept a 4D tensor of shape <code class="docutils literal notranslate"><span class="pre">(batch_size,</span>
<span class="pre">n_chans,</span> <span class="pre">n_times,</span> <span class="pre">n_epochs)</span></code>, in case of cropped model.</p>
<p>All the models are implemented as subclasses of
<a class="reference internal" href="generated/braindecode.models.EEGModuleMixin.html#braindecode.models.EEGModuleMixin" title="braindecode.models.EEGModuleMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">EEGModuleMixin</span></code></a>, which is a base class for all EEG models
in Braindecode. The <a class="reference internal" href="generated/braindecode.models.EEGModuleMixin.html#braindecode.models.EEGModuleMixin" title="braindecode.models.EEGModuleMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">EEGModuleMixin</span></code></a> class provides a common
interface for all EEG models and can derive variable names when needed.</p>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p><strong>Hugging Face Hub Integration</strong></p>
<p>All models in braindecode naturally possess the capability to push and pull from the
Hugging Face Hub through inheritance from
<a class="reference external" href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin" title="(in huggingface_hub main)"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyTorchModelHubMixin</span></code></a>. This allows you to:</p>
<ul class="simple">
<li><p><strong>Load pre-trained models</strong> from the Hub using
<code class="docutils literal notranslate"><span class="pre">Model.from_pretrained("repo_id")</span></code></p></li>
<li><p><strong>Share your trained models</strong> with the community using
<code class="docutils literal notranslate"><span class="pre">model.push_to_hub("repo_id")</span></code></p></li>
<li><p><strong>Version control your models</strong> with git-like versioning on the Hub</p></li>
</ul>
<p>To enable this functionality, install braindecode with Hub support:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">braindecode</span><span class="p">[</span><span class="n">hug</span><span class="p">]</span>
</pre></div>
</div>
<p><strong>Available pre-trained models:</strong></p>
<p>Some models have pre-trained weights available on the Hugging Face BrainDecode
organization:</p>
<ul class="simple">
<li><p><a class="reference internal" href="generated/braindecode.models.BIOT.html#braindecode.models.BIOT" title="braindecode.models.BIOT"><code class="xref py py-class docutils literal notranslate"><span class="pre">BIOT</span></code></a> - Foundation model with pre-trained weights</p></li>
<li><p><a class="reference internal" href="generated/braindecode.models.CBraMod.html#braindecode.models.CBraMod" title="braindecode.models.CBraMod"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBraMod</span></code></a> - Criss-Cross Transformer model with pre-trained weights</p></li>
<li><p><a class="reference internal" href="generated/braindecode.models.CodeBrain.html#braindecode.models.CodeBrain" title="braindecode.models.CodeBrain"><code class="xref py py-class docutils literal notranslate"><span class="pre">CodeBrain</span></code></a> - Scalable EEG pre-training with temporal and spectral code
prediction</p></li>
<li><p><a class="reference internal" href="generated/braindecode.models.Labram.html#braindecode.models.Labram" title="braindecode.models.Labram"><code class="xref py py-class docutils literal notranslate"><span class="pre">Labram</span></code></a> - Large Brain Model with pre-trained weights</p></li>
<li><p><a class="reference internal" href="generated/braindecode.models.REVE.html#braindecode.models.REVE" title="braindecode.models.REVE"><code class="xref py py-class docutils literal notranslate"><span class="pre">REVE</span></code></a> - EEG foundation model with pre-trained weights</p></li>
<li><p><a class="reference internal" href="generated/braindecode.models.LUNA.html#braindecode.models.LUNA" title="braindecode.models.LUNA"><code class="xref py py-class docutils literal notranslate"><span class="pre">LUNA</span></code></a> - Universal EEG embedding model with pre-trained weights</p></li>
<li><p><a class="reference internal" href="generated/braindecode.models.BENDR.html#braindecode.models.BENDR" title="braindecode.models.BENDR"><code class="xref py py-class docutils literal notranslate"><span class="pre">BENDR</span></code></a> - Foundation model with pre-trained weights</p></li>
<li><p><a class="reference internal" href="generated/braindecode.models.SignalJEPA.html#braindecode.models.SignalJEPA" title="braindecode.models.SignalJEPA"><code class="xref py py-class docutils literal notranslate"><span class="pre">SignalJEPA</span></code></a> - Self-supervised learning model with pre-trained weights</p></li>
<li><p><a class="reference internal" href="generated/braindecode.models.EEGPT.html#braindecode.models.EEGPT" title="braindecode.models.EEGPT"><code class="xref py py-class docutils literal notranslate"><span class="pre">EEGPT</span></code></a> - Pretrained transformer for universal EEG</p></li>
</ul>
<p><strong>Example - Loading a pre-trained model:</strong></p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">braindecode.models</span><span class="w"> </span><span class="kn">import</span> <span class="n">BIOT</span>
<span class="c1"># Load pre-trained BIOT model from Hugging Face Hub</span>
<span class="n">model</span> <span class="o">=</span> <span class="n">BIOT</span><span class="o">.</span><span class="n">from_pretrained</span><span class="p">(</span><span class="s2">"braindecode/biot-pretrained-prest-16chs"</span><span class="p">)</span>
<span class="c1"># Use for your EEG classification task</span>
<span class="c1"># ... your code here ...</span>
</pre></div>
</div>
<p><strong>Example - Pushing your trained model:</strong></p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">braindecode.models</span><span class="w"> </span><span class="kn">import</span> <span class="n">EEGNeX</span>
<span class="c1"># Train your model</span>
<span class="n">model</span> <span class="o">=</span> <span class="n">EEGNeX</span><span class="p">(</span><span class="n">n_chans</span><span class="o">=</span><span class="mi">22</span><span class="p">,</span> <span class="n">n_outputs</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">n_times</span><span class="o">=</span><span class="mi">1000</span><span class="p">)</span>
<span class="c1"># ... training code ...</span>
<span class="c1"># Push to the Hub (requires huggingface-cli login)</span>
<span class="n">model</span><span class="o">.</span><span class="n">push_to_hub</span><span class="p">(</span>
<span class="n">repo_id</span><span class="o">=</span><span class="s2">"username/my-eegnex-model"</span><span class="p">,</span> <span class="n">commit_message</span><span class="o">=</span><span class="s2">"Initial model upload"</span>
<span class="p">)</span>
</pre></div>
</div>
<p>For more details, see the <a class="reference internal" href="generated/braindecode.models.EEGModuleMixin.html#braindecode.models.EEGModuleMixin" title="braindecode.models.EEGModuleMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">EEGModuleMixin</span></code></a> documentation
and the <a class="reference internal" href="auto_examples/datasets_io/plot_hub_integration.html#hub-integration"><span class="std std-ref">Uploading and downloading datasets to Hugging Face Hub</span></a> tutorial.</p>
</div>
<dl class="field-list simple">
<dt class="field-odd">note<span class="colon">:</span></dt>
<dd class="field-odd"><p>Auto-generated Pydantic configs are available when the optional
<code class="docutils literal notranslate"><span class="pre">braindecode[pydantic]</span></code> extra (which installs <code class="docutils literal notranslate"><span class="pre">pydantic</span></code> and <code class="docutils literal notranslate"><span class="pre">numpydantic</span></code>) is
installed; otherwise config generation is skipped.</p>
</dd>
</dl>
<p><code class="xref py py-mod docutils literal notranslate"><span class="pre">braindecode.models.base</span></code>:</p>
<div class="pst-scrollable-table-container"><table class="autosummary longtable table">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.EEGModuleMixin.html#braindecode.models.EEGModuleMixin" title="braindecode.models.EEGModuleMixin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EEGModuleMixin</span></code></a>([n_outputs, n_chans, ...])</p></td>
<td><p>Mixin class for all EEG models in braindecode.</p></td>
</tr>
</tbody>
</table>
</div>
<p><code class="xref py py-mod docutils literal notranslate"><span class="pre">braindecode.models</span></code>:</p>
<div class="pst-scrollable-table-container"><table class="autosummary longtable table">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.ATCNet.html#braindecode.models.ATCNet" title="braindecode.models.ATCNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ATCNet</span></code></a>([n_chans, n_outputs, ...])</p></td>
<td><p>ATCNet from Altaheri et al (2022) <a class="reference internal" href="generated/braindecode.models.ATCNet.html#r2ecdb73d6ab9-1" id="id1"><span>[R2ecdb73d6ab9-1]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.AttentionBaseNet.html#braindecode.models.AttentionBaseNet" title="braindecode.models.AttentionBaseNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AttentionBaseNet</span></code></a>([n_times, n_chans, ...])</p></td>
<td><p>AttentionBaseNet from Wimpff M et al (2023) <a class="reference internal" href="generated/braindecode.models.AttentionBaseNet.html#r523d6c831d64-martin2023" id="id2"><span>[R523d6c831d64-Martin2023]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.AttnSleep.html#braindecode.models.AttnSleep" title="braindecode.models.AttnSleep"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AttnSleep</span></code></a>([sfreq, n_tce, d_model, d_ff, ...])</p></td>
<td><p>Sleep Staging Architecture from Eldele et al (2021) <a class="reference internal" href="generated/braindecode.models.AttnSleep.html#re40f69d9f16e-eldele2021" id="id3"><span>[Re40f69d9f16e-Eldele2021]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.BDTCN.html#braindecode.models.BDTCN" title="braindecode.models.BDTCN"><code class="xref py py-obj docutils literal notranslate"><span class="pre">BDTCN</span></code></a>([n_chans, n_outputs, chs_info, ...])</p></td>
<td><p>Braindecode TCN from Gemein, L et al (2020) <a class="reference internal" href="generated/braindecode.models.BDTCN.html#rd56781dc6fcb-gemein2020" id="id4"><span>[Rd56781dc6fcb-gemein2020]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.BENDR.html#braindecode.models.BENDR" title="braindecode.models.BENDR"><code class="xref py py-obj docutils literal notranslate"><span class="pre">BENDR</span></code></a>([n_chans, n_outputs, n_times, ...])</p></td>
<td><p>BENDR (BErt-inspired Neural Data Representations) from Kostas et al (2021) <a class="reference internal" href="generated/braindecode.models.BENDR.html#r26ccbd70a49a-bendr" id="id5"><span>[R26ccbd70a49a-bendr]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.BIOT.html#braindecode.models.BIOT" title="braindecode.models.BIOT"><code class="xref py py-obj docutils literal notranslate"><span class="pre">BIOT</span></code></a>([embed_dim, num_heads, num_layers, ...])</p></td>
<td><p>BIOT from Yang et al (2023) <a class="reference internal" href="generated/braindecode.models.BIOT.html#r606e26b38fe6-yang2023" id="id6"><span>[R606e26b38fe6-Yang2023]</span></a></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.BrainModule.html#braindecode.models.BrainModule" title="braindecode.models.BrainModule"><code class="xref py py-obj docutils literal notranslate"><span class="pre">BrainModule</span></code></a>([n_chans, n_outputs, n_times, ...])</p></td>
<td><p>BrainModule from <a class="reference internal" href="generated/braindecode.models.BrainModule.html#rf869b8ed6368-brainmagick" id="id7"><span>[Rf869b8ed6368-brainmagick]</span></a>, also known as SimpleConv.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.CBraMod.html#braindecode.models.CBraMod" title="braindecode.models.CBraMod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CBraMod</span></code></a>([n_outputs, n_chans, chs_info, ...])</p></td>
<td><p><strong>C</strong>riss-<strong>C</strong>ross <strong>Bra</strong>in <strong>Mod</strong>el for EEG Decoding from Wang et al. (2025) <a class="reference internal" href="generated/braindecode.models.CBraMod.html#rdb05ba1b4969-cbramod" id="id8"><span>[Rdb05ba1b4969-cbramod]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.CodeBrain.html#braindecode.models.CodeBrain" title="braindecode.models.CodeBrain"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CodeBrain</span></code></a>([n_outputs, n_chans, chs_info, ...])</p></td>
<td><p>CodeBrain: Scalable Code EEG Pre-Training for Unified Downstream BCI Tasks.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.ContraWR.html#braindecode.models.ContraWR" title="braindecode.models.ContraWR"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ContraWR</span></code></a>([n_chans, n_outputs, sfreq, ...])</p></td>
<td><p>Contrast with the World Representation ContraWR from Yang et al (2021) <a class="reference internal" href="generated/braindecode.models.ContraWR.html#ra71465cb6797-yang2021" id="id9"><span>[Ra71465cb6797-Yang2021]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.CTNet.html#braindecode.models.CTNet" title="braindecode.models.CTNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CTNet</span></code></a>([n_outputs, n_chans, sfreq, chs_info, ...])</p></td>
<td><p>CTNet from Zhao, W et al (2024) <a class="reference internal" href="generated/braindecode.models.CTNet.html#rc7f1d6cec70c-ctnet" id="id10"><span>[Rc7f1d6cec70c-ctnet]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.DGCNN.html#braindecode.models.DGCNN" title="braindecode.models.DGCNN"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DGCNN</span></code></a>([n_outputs, n_chans, chs_info, ...])</p></td>
<td><p>DGCNN for EEG classification from Song et al. (2018) <a class="reference internal" href="generated/braindecode.models.DGCNN.html#rff991d0fb90b-dgcnn" id="id11"><span>[Rff991d0fb90b-dgcnn]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.Deep4Net.html#braindecode.models.Deep4Net" title="braindecode.models.Deep4Net"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Deep4Net</span></code></a>([n_chans, n_outputs, n_times, ...])</p></td>
<td><p>Deep ConvNet model from Schirrmeister et al (2017) <a class="reference internal" href="generated/braindecode.models.Deep4Net.html#rb8ef6c2733ce-schirrmeister2017" id="id12"><span>[Rb8ef6c2733ce-Schirrmeister2017]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.DeepSleepNet.html#braindecode.models.DeepSleepNet" title="braindecode.models.DeepSleepNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DeepSleepNet</span></code></a>([n_outputs, return_feats, ...])</p></td>
<td><p>DeepSleepNet from Supratak et al (2017) <a class="reference internal" href="generated/braindecode.models.DeepSleepNet.html#r28b528aca953-supratak2017" id="id13"><span>[R28b528aca953-Supratak2017]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.EEGConformer.html#braindecode.models.EEGConformer" title="braindecode.models.EEGConformer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EEGConformer</span></code></a>([n_outputs, n_chans, ...])</p></td>
<td><p>EEG Conformer from Song et al (2022) <a class="reference internal" href="generated/braindecode.models.EEGConformer.html#rd6c0fefc356a-song2022" id="id14"><span>[Rd6c0fefc356a-song2022]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.EEGInceptionERP.html#braindecode.models.EEGInceptionERP" title="braindecode.models.EEGInceptionERP"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EEGInceptionERP</span></code></a>([n_chans, n_outputs, ...])</p></td>
<td><p>EEG Inception for ERP-based from Santamaria-Vazquez et al (2020) <a class="reference internal" href="generated/braindecode.models.EEGInceptionERP.html#r37c4761d4e92-santamaria2020" id="id15"><span>[R37c4761d4e92-santamaria2020]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.EEGInceptionMI.html#braindecode.models.EEGInceptionMI" title="braindecode.models.EEGInceptionMI"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EEGInceptionMI</span></code></a>([n_chans, n_outputs, ...])</p></td>
<td><p>EEG Inception for Motor Imagery, as proposed in Zhang et al. (2021) <a class="reference internal" href="generated/braindecode.models.EEGInceptionMI.html#rc36ed781f4f5-1" id="id16"><span>[Rc36ed781f4f5-1]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.EEGITNet.html#braindecode.models.EEGITNet" title="braindecode.models.EEGITNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EEGITNet</span></code></a>([n_outputs, n_chans, n_times, ...])</p></td>
<td><p>EEG-ITNet from Salami, et al (2022) <a class="reference internal" href="generated/braindecode.models.EEGITNet.html#r7fe571f46200-salami2022" id="id17"><span>[R7fe571f46200-Salami2022]</span></a></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.EEGMiner.html#braindecode.models.EEGMiner" title="braindecode.models.EEGMiner"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EEGMiner</span></code></a>([method, n_chans, n_outputs, ...])</p></td>
<td><p>EEGMiner from Ludwig et al (2024) <a class="reference internal" href="generated/braindecode.models.EEGMiner.html#r66a8789ab6ed-eegminer" id="id18"><span>[R66a8789ab6ed-eegminer]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.EEGNet.html#braindecode.models.EEGNet" title="braindecode.models.EEGNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EEGNet</span></code></a>([n_chans, n_outputs, n_times, ...])</p></td>
<td><p>EEGNet model from Lawhern et al (2018) <a class="reference internal" href="generated/braindecode.models.EEGNet.html#rffa56cc934a8-lawhern2018" id="id19"><span>[Rffa56cc934a8-Lawhern2018]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.EEGPT.html#braindecode.models.EEGPT" title="braindecode.models.EEGPT"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EEGPT</span></code></a>([n_outputs, n_chans, chs_info, ...])</p></td>
<td><p>EEGPT: Pretrained Transformer for Universal and Reliable Representation of EEG Signals from Wang et al. (2024) <a class="reference internal" href="generated/braindecode.models.EEGPT.html#r025fd21f633e-eegpt" id="id20"><span>[R025fd21f633e-eegpt]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.EEGNeX.html#braindecode.models.EEGNeX" title="braindecode.models.EEGNeX"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EEGNeX</span></code></a>([n_chans, n_outputs, n_times, ...])</p></td>
<td><p>EEGNeX model from Chen et al (2024) <a class="reference internal" href="generated/braindecode.models.EEGNeX.html#r60f8df15fd80-eegnex" id="id21"><span>[R60f8df15fd80-eegnex]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.EEGSimpleConv.html#braindecode.models.EEGSimpleConv" title="braindecode.models.EEGSimpleConv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EEGSimpleConv</span></code></a>([n_outputs, n_chans, sfreq, ...])</p></td>
<td><p>EEGSimpleConv from Ouahidi, YE et al (2023) <a class="reference internal" href="generated/braindecode.models.EEGSimpleConv.html#r5661533ddc63-yassine2023" id="id22"><span>[R5661533ddc63-Yassine2023]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.EEGSym.html#braindecode.models.EEGSym" title="braindecode.models.EEGSym"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EEGSym</span></code></a>([n_chans, n_outputs, n_times, ...])</p></td>
<td><p>EEGSym from Pérez-Velasco et al (2022) <a class="reference internal" href="generated/braindecode.models.EEGSym.html#r871bea9be1d1-eegsym2022" id="id23"><span>[R871bea9be1d1-eegsym2022]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.EEGTCNet.html#braindecode.models.EEGTCNet" title="braindecode.models.EEGTCNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EEGTCNet</span></code></a>([n_chans, n_outputs, n_times, ...])</p></td>
<td><p>EEGTCNet model from Ingolfsson et al (2020) <a class="reference internal" href="generated/braindecode.models.EEGTCNet.html#rc25b3d8a3a40-ingolfsson2020" id="id24"><span>[Rc25b3d8a3a40-ingolfsson2020]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.EMG2QwertyNet.html#braindecode.models.EMG2QwertyNet" title="braindecode.models.EMG2QwertyNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EMG2QwertyNet</span></code></a>([n_outputs, n_chans, sfreq, ...])</p></td>
<td><p>Decoder mapping surface electromyography (sEMG) to keystrokes (emg2qwerty) <a class="reference internal" href="generated/braindecode.models.EMG2QwertyNet.html#r6311dcb4571d-emg2qwerty2024" id="id25"><span>[R6311dcb4571d-emg2qwerty2024]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.FBCNet.html#braindecode.models.FBCNet" title="braindecode.models.FBCNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FBCNet</span></code></a>([n_chans, n_outputs, chs_info, ...])</p></td>
<td><p>FBCNet from Mane, R et al (2021) <a class="reference internal" href="generated/braindecode.models.FBCNet.html#r9769c9f8e3f7-fbcnet2021" id="id26"><span>[R9769c9f8e3f7-fbcnet2021]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.FBLightConvNet.html#braindecode.models.FBLightConvNet" title="braindecode.models.FBLightConvNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FBLightConvNet</span></code></a>([n_chans, n_outputs, ...])</p></td>
<td><p>LightConvNet from Ma, X et al (2023) <a class="reference internal" href="generated/braindecode.models.FBLightConvNet.html#r501137d6e8c9-lightconvnet" id="id27"><span>[R501137d6e8c9-lightconvnet]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.FBMSNet.html#braindecode.models.FBMSNet" title="braindecode.models.FBMSNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FBMSNet</span></code></a>([n_chans, n_outputs, chs_info, ...])</p></td>
<td><p>FBMSNet from Liu et al (2022) <a class="reference internal" href="generated/braindecode.models.FBMSNet.html#re7850041dabd-fbmsnet" id="id28"><span>[Re7850041dabd-fbmsnet]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.IFNet.html#braindecode.models.IFNet" title="braindecode.models.IFNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">IFNet</span></code></a>([n_chans, n_outputs, n_times, ...])</p></td>
<td><p>IFNetV2 from Wang J et al (2023) <a class="reference internal" href="generated/braindecode.models.IFNet.html#rd9f3b242e751-ifnet" id="id29"><span>[Rd9f3b242e751-ifnet]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.InterpolatedBENDR.html#braindecode.models.InterpolatedBENDR" title="braindecode.models.InterpolatedBENDR"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InterpolatedBENDR</span></code></a>(chs_info[, n_outputs, ...])</p></td>
<td><p>Channel-interpolating wrapper around <a class="reference internal" href="generated/braindecode.models.BENDR.html#braindecode.models.BENDR" title="braindecode.models.BENDR"><code class="xref py py-class docutils literal notranslate"><span class="pre">BENDR</span></code></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.InterpolatedBIOT.html#braindecode.models.InterpolatedBIOT" title="braindecode.models.InterpolatedBIOT"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InterpolatedBIOT</span></code></a>(chs_info[, n_outputs, ...])</p></td>
<td><p>Channel-interpolating wrapper around <a class="reference internal" href="generated/braindecode.models.BIOT.html#braindecode.models.BIOT" title="braindecode.models.BIOT"><code class="xref py py-class docutils literal notranslate"><span class="pre">BIOT</span></code></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.InterpolatedEEGPT.html#braindecode.models.InterpolatedEEGPT" title="braindecode.models.InterpolatedEEGPT"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InterpolatedEEGPT</span></code></a>(chs_info[, n_outputs, ...])</p></td>
<td><p>Channel-interpolating wrapper around <a class="reference internal" href="generated/braindecode.models.EEGPT.html#braindecode.models.EEGPT" title="braindecode.models.EEGPT"><code class="xref py py-class docutils literal notranslate"><span class="pre">EEGPT</span></code></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.InterpolatedLaBraM.html#braindecode.models.InterpolatedLaBraM" title="braindecode.models.InterpolatedLaBraM"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InterpolatedLaBraM</span></code></a>(chs_info[, n_outputs, ...])</p></td>
<td><p>Channel-interpolating wrapper around <a class="reference internal" href="generated/braindecode.models.Labram.html#braindecode.models.Labram" title="braindecode.models.Labram"><code class="xref py py-class docutils literal notranslate"><span class="pre">Labram</span></code></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.InterpolatedModel.html#braindecode.models.InterpolatedModel" title="braindecode.models.InterpolatedModel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InterpolatedModel</span></code></a>(model_cls, target_chs_info)</p></td>
<td><p>Return a subclass of <code class="docutils literal notranslate"><span class="pre">model_cls</span></code> that interpolates channels to <code class="docutils literal notranslate"><span class="pre">target_chs_info</span></code>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.InterpolatedSignalJEPA.html#braindecode.models.InterpolatedSignalJEPA" title="braindecode.models.InterpolatedSignalJEPA"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InterpolatedSignalJEPA</span></code></a>(chs_info[, ...])</p></td>
<td><p>Channel-interpolating wrapper around <a class="reference internal" href="generated/braindecode.models.SignalJEPA.html#braindecode.models.SignalJEPA" title="braindecode.models.SignalJEPA"><code class="xref py py-class docutils literal notranslate"><span class="pre">SignalJEPA</span></code></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.Labram.html#braindecode.models.Labram" title="braindecode.models.Labram"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Labram</span></code></a>([n_times, n_outputs, chs_info, ...])</p></td>
<td><p>Labram from Jiang, W B et al (2024) <a class="reference internal" href="generated/braindecode.models.Labram.html#rb5cdfc6ea4fe-jiang2024" id="id30"><span>[Rb5cdfc6ea4fe-Jiang2024]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.LUNA.html#braindecode.models.LUNA" title="braindecode.models.LUNA"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LUNA</span></code></a>([n_outputs, n_chans, n_times, sfreq, ...])</p></td>
<td><p>LUNA from Döner et al <a class="reference internal" href="generated/braindecode.models.LUNA.html#ra888573a1c66-luna" id="id31"><span>[Ra888573a1c66-LUNA]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.MEDFormer.html#braindecode.models.MEDFormer" title="braindecode.models.MEDFormer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MEDFormer</span></code></a>([n_chans, n_outputs, n_times, ...])</p></td>
<td><p>Medformer from Wang et al (2024) <a class="reference internal" href="generated/braindecode.models.MEDFormer.html#rf62d33a1206f-medformer2024" id="id32"><span>[Rf62d33a1206f-Medformer2024]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.MetaNeuromotorHand.html#braindecode.models.MetaNeuromotorHand" title="braindecode.models.MetaNeuromotorHand"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MetaNeuromotorHand</span></code></a>([n_outputs, n_chans, ...])</p></td>
<td><p>Generic neuromotor interface for handwriting from Meta (2025) <a class="reference internal" href="generated/braindecode.models.MetaNeuromotorHand.html#r56528df87fac-gni2025" id="id33"><span>[R56528df87fac-gni2025]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.MSVTNet.html#braindecode.models.MSVTNet" title="braindecode.models.MSVTNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MSVTNet</span></code></a>([n_chans, n_outputs, n_times, ...])</p></td>
<td><p>MSVTNet model from Liu K et al (2024) from <a class="reference internal" href="generated/braindecode.models.MSVTNet.html#r0733e66fed6d-msvt2024" id="id34"><span>[R0733e66fed6d-msvt2024]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.PBT.html#braindecode.models.PBT" title="braindecode.models.PBT"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PBT</span></code></a>([n_chans, n_outputs, n_times, chs_info, ...])</p></td>
<td><p>Patched Brain Transformer (PBT) model from Klein et al (2025) <a class="reference internal" href="generated/braindecode.models.PBT.html#re7f840f86627-pbt" id="id35"><span>[Re7f840f86627-pbt]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.REVE.html#braindecode.models.REVE" title="braindecode.models.REVE"><code class="xref py py-obj docutils literal notranslate"><span class="pre">REVE</span></code></a>([n_outputs, n_chans, chs_info, ...])</p></td>
<td><p><strong>R</strong>epresentation for <strong>E</strong>EG with <strong>V</strong>ersatile <strong>E</strong>mbeddings (REVE) from El Ouahidi et al. (2025) <a class="reference internal" href="generated/braindecode.models.REVE.html#rfc92bf36d5c3-reve" id="id36"><span>[Rfc92bf36d5c3-reve]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.SCCNet.html#braindecode.models.SCCNet" title="braindecode.models.SCCNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SCCNet</span></code></a>([n_chans, n_outputs, n_times, ...])</p></td>
<td><p>SCCNet from Wei, C S (2019) <a class="reference internal" href="generated/braindecode.models.SCCNet.html#rbd95e5cdbbde-sccnet" id="id37"><span>[Rbd95e5cdbbde-sccnet]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.ShallowFBCSPNet.html#braindecode.models.ShallowFBCSPNet" title="braindecode.models.ShallowFBCSPNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ShallowFBCSPNet</span></code></a>([n_chans, n_outputs, ...])</p></td>
<td><p>Shallow ConvNet model from Schirrmeister et al (2017) <a class="reference internal" href="generated/braindecode.models.ShallowFBCSPNet.html#r9432a19f6121-schirrmeister2017" id="id38"><span>[R9432a19f6121-Schirrmeister2017]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.SignalJEPA.html#braindecode.models.SignalJEPA" title="braindecode.models.SignalJEPA"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SignalJEPA</span></code></a>([n_outputs, n_chans, chs_info, ...])</p></td>
<td><p>Architecture introduced in signal-JEPA for self-supervised pre-training, Guetschel, P et al (2024) <a class="reference internal" href="generated/braindecode.models.SignalJEPA.html#r62b31c4b9b52-1" id="id39"><span>[R62b31c4b9b52-1]</span></a></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.SignalJEPA_Contextual.html#braindecode.models.SignalJEPA_Contextual" title="braindecode.models.SignalJEPA_Contextual"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SignalJEPA_Contextual</span></code></a>([n_outputs, n_chans, ...])</p></td>
<td><p>Contextual downstream architecture introduced in signal-JEPA Guetschel, P et al (2024) <a class="reference internal" href="generated/braindecode.models.SignalJEPA_Contextual.html#rb25bb9e753a8-1" id="id40"><span>[Rb25bb9e753a8-1]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.SignalJEPA_PostLocal.html#braindecode.models.SignalJEPA_PostLocal" title="braindecode.models.SignalJEPA_PostLocal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SignalJEPA_PostLocal</span></code></a>([n_outputs, n_chans, ...])</p></td>
<td><p>Post-local downstream architecture introduced in signal-JEPA Guetschel, P et al (2024) <a class="reference internal" href="generated/braindecode.models.SignalJEPA_PostLocal.html#r29e8e87440e5-1" id="id41"><span>[R29e8e87440e5-1]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.SignalJEPA_PreLocal.html#braindecode.models.SignalJEPA_PreLocal" title="braindecode.models.SignalJEPA_PreLocal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SignalJEPA_PreLocal</span></code></a>([n_outputs, n_chans, ...])</p></td>
<td><p>Pre-local downstream architecture introduced in signal-JEPA Guetschel, P et al (2024) <a class="reference internal" href="generated/braindecode.models.SignalJEPA_PreLocal.html#r795e75e58da6-1" id="id42"><span>[R795e75e58da6-1]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.SincShallowNet.html#braindecode.models.SincShallowNet" title="braindecode.models.SincShallowNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SincShallowNet</span></code></a>([num_time_filters, ...])</p></td>
<td><p>Sinc-ShallowNet from Borra, D et al (2020) <a class="reference internal" href="generated/braindecode.models.SincShallowNet.html#r4fd1ba6a7153-borra2020" id="id43"><span>[R4fd1ba6a7153-borra2020]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.SleepStagerBlanco2020.html#braindecode.models.SleepStagerBlanco2020" title="braindecode.models.SleepStagerBlanco2020"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SleepStagerBlanco2020</span></code></a>([n_chans, sfreq, ...])</p></td>
<td><p>Sleep staging architecture from Blanco et al (2020) from <a class="reference internal" href="generated/braindecode.models.SleepStagerBlanco2020.html#rb3eee9d9e81a-blanco2020" id="id44"><span>[Rb3eee9d9e81a-Blanco2020]</span></a></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.SleepStagerChambon2018.html#braindecode.models.SleepStagerChambon2018" title="braindecode.models.SleepStagerChambon2018"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SleepStagerChambon2018</span></code></a>([n_chans, sfreq, ...])</p></td>
<td><p>Sleep staging architecture from Chambon et al. (2018) <a class="reference internal" href="generated/braindecode.models.SleepStagerChambon2018.html#r89163c5eab6a-chambon2018" id="id45"><span>[R89163c5eab6a-Chambon2018]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.SPARCNet.html#braindecode.models.SPARCNet" title="braindecode.models.SPARCNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SPARCNet</span></code></a>([n_chans, n_times, n_outputs, ...])</p></td>
<td><p>Seizures, Periodic and Rhythmic pattern Continuum Neural Network (SPaRCNet) from Jing et al (2023) <a class="reference internal" href="generated/braindecode.models.SPARCNet.html#rf8eed20f8ca2-jing2023" id="id46"><span>[Rf8eed20f8ca2-jing2023]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.SSTDPN.html#braindecode.models.SSTDPN" title="braindecode.models.SSTDPN"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SSTDPN</span></code></a>([n_chans, n_times, n_outputs, ...])</p></td>
<td><p>SSTDPN from Can Han et al (2025) <a class="reference internal" href="generated/braindecode.models.SSTDPN.html#r15c5a176a51e-han2025" id="id47"><span>[R15c5a176a51e-Han2025]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.SyncNet.html#braindecode.models.SyncNet" title="braindecode.models.SyncNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SyncNet</span></code></a>([n_chans, n_times, n_outputs, ...])</p></td>
<td><p>Synchronization Network (SyncNet) from Li, Y et al (2017) <a class="reference internal" href="generated/braindecode.models.SyncNet.html#r5cdbe961b734-li2017" id="id48"><span>[R5cdbe961b734-Li2017]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.TIDNet.html#braindecode.models.TIDNet" title="braindecode.models.TIDNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">TIDNet</span></code></a>([n_chans, n_outputs, n_times, ...])</p></td>
<td><p>Thinker Invariance DenseNet model from Kostas et al (2020) <a class="reference internal" href="generated/braindecode.models.TIDNet.html#re74dd80418c9-tidnet" id="id49"><span>[Re74dd80418c9-TIDNet]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/braindecode.models.TSception.html#braindecode.models.TSception" title="braindecode.models.TSception"><code class="xref py py-obj docutils literal notranslate"><span class="pre">TSception</span></code></a>([n_chans, n_outputs, ...])</p></td>
<td><p>TSception model from Ding et al. (2020) from <a class="reference internal" href="generated/braindecode.models.TSception.html#r576865d14b94-ding2020" id="id50"><span>[R576865d14b94-ding2020]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/braindecode.models.USleep.html#braindecode.models.USleep" title="braindecode.models.USleep"><code class="xref py py-obj docutils literal notranslate"><span class="pre">USleep</span></code></a>([n_chans, sfreq, depth, ...])</p></td>
<td><p>Sleep staging architecture from Perslev et al (2021) <a class="reference internal" href="generated/braindecode.models.USleep.html#r58a5e8182f0a-1" id="id51"><span>[R58a5e8182f0a-1]</span></a>.</p></td>
</tr>
</tbody>
</table>
</div>
<p>Modules</p>
<p><code class="xref py py-mod docutils literal notranslate"><span class="pre">braindecode.modules</span></code>:</p>
<p>This module contains the building blocks for Braindecode models. It contains activation
functions, convolutional layers, attention mechanisms, filter banks, and other
utilities.</p>
<section id="activation">
<h3>Activation<a class="headerlink" href="#activation" title="Link to this heading">#</a></h3>
<p>These modules wrap specialized activation functions—e.g., safe logarithms for numerical
stability.</p>
<p><code class="xref py py-mod docutils literal notranslate"><span class="pre">braindecode.modules.activation</span></code>:</p>
<div class="pst-scrollable-table-container"><table class="autosummary longtable table">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/activation/braindecode.modules.LogActivation.html#braindecode.modules.LogActivation" title="braindecode.modules.LogActivation"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LogActivation</span></code></a>([epsilon])</p></td>
<td><p>Logarithm activation function.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/activation/braindecode.modules.SafeLog.html#braindecode.modules.SafeLog" title="braindecode.modules.SafeLog"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SafeLog</span></code></a>([epsilon])</p></td>
<td><p>Safe logarithm activation function module.</p></td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="attention">
<h3>Attention<a class="headerlink" href="#attention" title="Link to this heading">#</a></h3>
<p>These modules implement various attention mechanisms, including multi’head attention and
squeeze and excitation layers.</p>
<p><code class="xref py py-mod docutils literal notranslate"><span class="pre">braindecode.modules.attention</span></code>:</p>
<div class="pst-scrollable-table-container"><table class="autosummary longtable table">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/attention/braindecode.modules.CAT.html#braindecode.modules.CAT" title="braindecode.modules.CAT"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CAT</span></code></a>(in_channels, reduction_rate, kernel_size)</p></td>
<td><p>Attention Mechanism from <a class="reference internal" href="generated/attention/braindecode.modules.CAT.html#r4b3f3c7c2fe2-wu2023" id="id52"><span>[R4b3f3c7c2fe2-Wu2023]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/attention/braindecode.modules.CBAM.html#braindecode.modules.CBAM" title="braindecode.modules.CBAM"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CBAM</span></code></a>(in_channels, reduction_rate, kernel_size)</p></td>
<td><p>Convolutional Block Attention Module from <a class="reference internal" href="generated/attention/braindecode.modules.CBAM.html#r8389a3af090c-woo2018" id="id53"><span>[R8389a3af090c-Woo2018]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/attention/braindecode.modules.ECA.html#braindecode.modules.ECA" title="braindecode.modules.ECA"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ECA</span></code></a>(in_channels, kernel_size)</p></td>
<td><p>Efficient Channel Attention <a class="reference internal" href="generated/attention/braindecode.modules.ECA.html#r18399df6eede-wang2021" id="id54"><span>[R18399df6eede-Wang2021]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/attention/braindecode.modules.FCA.html#braindecode.modules.FCA" title="braindecode.modules.FCA"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FCA</span></code></a>(in_channels[, seq_len, reduction_rate, ...])</p></td>
<td><p>Frequency Channel Attention Networks from <a class="reference internal" href="generated/attention/braindecode.modules.FCA.html#r7a6c40ff4f0b-qin2021" id="id55"><span>[R7a6c40ff4f0b-Qin2021]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/attention/braindecode.modules.GCT.html#braindecode.modules.GCT" title="braindecode.modules.GCT"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GCT</span></code></a>(in_channels)</p></td>
<td><p>Gated Channel Transformation from <a class="reference internal" href="generated/attention/braindecode.modules.GCT.html#r977e9a24fcb7-yang2020" id="id56"><span>[R977e9a24fcb7-Yang2020]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/attention/braindecode.modules.SRM.html#braindecode.modules.SRM" title="braindecode.modules.SRM"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SRM</span></code></a>(in_channels[, use_mlp, reduction_rate, bias])</p></td>
<td><p>Attention module from <a class="reference internal" href="generated/attention/braindecode.modules.SRM.html#r94e1b7c716d1-lee2019" id="id57"><span>[R94e1b7c716d1-Lee2019]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/attention/braindecode.modules.CATLite.html#braindecode.modules.CATLite" title="braindecode.modules.CATLite"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CATLite</span></code></a>(in_channels, reduction_rate[, bias])</p></td>
<td><p>Modification of CAT without the convolutional layer from <a class="reference internal" href="generated/attention/braindecode.modules.CATLite.html#r1d30135f2545-wu2023" id="id58"><span>[R1d30135f2545-Wu2023]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/attention/braindecode.modules.EncNet.html#braindecode.modules.EncNet" title="braindecode.modules.EncNet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EncNet</span></code></a>(in_channels, n_codewords)</p></td>
<td><p>Context Encoding for Semantic Segmentation from <a class="reference internal" href="generated/attention/braindecode.modules.EncNet.html#r13609999c674-zhang2018" id="id59"><span>[R13609999c674-Zhang2018]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/attention/braindecode.modules.GatherExcite.html#braindecode.modules.GatherExcite" title="braindecode.modules.GatherExcite"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GatherExcite</span></code></a>(in_channels[, seq_len, ...])</p></td>
<td><p>Gather-Excite Networks from <a class="reference internal" href="generated/attention/braindecode.modules.GatherExcite.html#re3d24ebdda8b-hu2018b" id="id60"><span>[Re3d24ebdda8b-Hu2018b]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/attention/braindecode.modules.GSoP.html#braindecode.modules.GSoP" title="braindecode.modules.GSoP"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GSoP</span></code></a>(in_channels, reduction_rate[, bias])</p></td>
<td><p>Global Second-order Pooling Convolutional Networks from <a class="reference internal" href="generated/attention/braindecode.modules.GSoP.html#reb98cd67024f-gao2018" id="id61"><span>[Reb98cd67024f-Gao2018]</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/attention/braindecode.modules.MultiHeadAttention.html#braindecode.modules.MultiHeadAttention" title="braindecode.modules.MultiHeadAttention"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiHeadAttention</span></code></a>(emb_size, num_heads[, ...])</p></td>
<td><p>Multi-head self-attention block.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/attention/braindecode.modules.SqueezeAndExcitation.html#braindecode.modules.SqueezeAndExcitation" title="braindecode.modules.SqueezeAndExcitation"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SqueezeAndExcitation</span></code></a>(in_channels, reduction_rate)</p></td>
<td><p>Squeeze-and-Excitation Networks from <a class="reference internal" href="generated/attention/braindecode.modules.SqueezeAndExcitation.html#r0b6baaf6da0f-hu2018" id="id62"><span>[R0b6baaf6da0f-Hu2018]</span></a>.</p></td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="blocks">
<h3>Blocks<a class="headerlink" href="#blocks" title="Link to this heading">#</a></h3>
<p>These modules are specialized building blocks for neural networks, including multi’layer
perceptrons (MLPs) and inception blocks.</p>
<p><code class="xref py py-mod docutils literal notranslate"><span class="pre">braindecode.modules.blocks</span></code>:</p>
<div class="pst-scrollable-table-container"><table class="autosummary longtable table">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/blocks/braindecode.modules.MLP.html#braindecode.modules.MLP" title="braindecode.modules.MLP"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MLP</span></code></a>(in_features[, hidden_features, ...])</p></td>
<td><p>Multilayer Perceptron (MLP) with GELU activation and optional dropout.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/blocks/braindecode.modules.FeedForwardBlock.html#braindecode.modules.FeedForwardBlock" title="braindecode.modules.FeedForwardBlock"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FeedForwardBlock</span></code></a>(emb_size, expansion, drop_p)</p></td>
<td><p>Feedforward network block.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/blocks/braindecode.modules.InceptionBlock.html#braindecode.modules.InceptionBlock" title="braindecode.modules.InceptionBlock"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InceptionBlock</span></code></a>(branches)</p></td>
<td><p>Inception block module.</p></td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="convolution">
<h3>Convolution<a class="headerlink" href="#convolution" title="Link to this heading">#</a></h3>
<p>These modules implement constraints convolutional layers, including depthwise
convolutions and causal convolutions. They also include convolutional layers with
constraints and pooling layers.</p>
<p><code class="xref py py-mod docutils literal notranslate"><span class="pre">braindecode.modules.convolution</span></code>:</p>
<div class="pst-scrollable-table-container"><table class="autosummary longtable table">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/convolution/braindecode.modules.AvgPool2dWithConv.html#braindecode.modules.AvgPool2dWithConv" title="braindecode.modules.AvgPool2dWithConv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AvgPool2dWithConv</span></code></a>(kernel_size, stride[, ...])</p></td>
<td><p>Compute average pooling using a convolution, to have the dilation parameter.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/convolution/braindecode.modules.CausalConv1d.html#braindecode.modules.CausalConv1d" title="braindecode.modules.CausalConv1d"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CausalConv1d</span></code></a>(in_channels, out_channels, ...)</p></td>
<td><p>Causal 1-dimensional convolution</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/convolution/braindecode.modules.CombinedConv.html#braindecode.modules.CombinedConv" title="braindecode.modules.CombinedConv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CombinedConv</span></code></a>(in_chans[, n_filters_time, ...])</p></td>
<td><p>Merged convolutional layer for temporal and spatial convs in Deep4/ShallowFBCSP</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/convolution/braindecode.modules.Conv2dWithConstraint.html#braindecode.modules.Conv2dWithConstraint" title="braindecode.modules.Conv2dWithConstraint"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Conv2dWithConstraint</span></code></a>(*args[, max_norm])</p></td>
<td><p>2D convolution with max-norm constraint on the weights.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/convolution/braindecode.modules.DepthwiseConv2d.html#braindecode.modules.DepthwiseConv2d" title="braindecode.modules.DepthwiseConv2d"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DepthwiseConv2d</span></code></a>(in_channels[, ...])</p></td>
<td><p>Depthwise convolution layer.</p></td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="filter">
<h3>Filter<a class="headerlink" href="#filter" title="Link to this heading">#</a></h3>
<p>These modules implement Filter Bank as Layer and generalizer Gaussian layer.</p>
<p><code class="xref py py-mod docutils literal notranslate"><span class="pre">braindecode.modules.filter</span></code>:</p>
<div class="pst-scrollable-table-container"><table class="autosummary longtable table">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/filter/braindecode.modules.ChannelInterpolationLayer.html#braindecode.modules.ChannelInterpolationLayer" title="braindecode.modules.ChannelInterpolationLayer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ChannelInterpolationLayer</span></code></a>(src_chs_info, ...)</p></td>
<td><p>Projects an input from one channel set to another via a fixed (or learnable) matrix.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/filter/braindecode.modules.FilterBankLayer.html#braindecode.modules.FilterBankLayer" title="braindecode.modules.FilterBankLayer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FilterBankLayer</span></code></a>(n_chans, sfreq[, ...])</p></td>
<td><p>Apply multiple band-pass filters to generate multiview signal representation.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/filter/braindecode.modules.GeneralizedGaussianFilter.html#braindecode.modules.GeneralizedGaussianFilter" title="braindecode.modules.GeneralizedGaussianFilter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GeneralizedGaussianFilter</span></code></a>(in_channels, ...)</p></td>
<td><p>Generalized Gaussian Filter from Ludwig et al (2024) <a class="reference internal" href="generated/filter/braindecode.modules.GeneralizedGaussianFilter.html#raf65b68c9f5f-eegminer" id="id63"><span>[Raf65b68c9f5f-eegminer]</span></a>.</p></td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="layers">
<h3>Layers<a class="headerlink" href="#layers" title="Link to this heading">#</a></h3>
<p>These modules implement various types of layers, including dropout layers, normalization
layers, and time’distributed layers. They also include layers for handling different
input shapes and dimensions.</p>
<p><code class="xref py py-mod docutils literal notranslate"><span class="pre">braindecode.modules.layers</span></code>:</p>
<div class="pst-scrollable-table-container"><table class="autosummary longtable table">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/layers/braindecode.modules.Chomp1d.html#braindecode.modules.Chomp1d" title="braindecode.modules.Chomp1d"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Chomp1d</span></code></a>(chomp_size)</p></td>
<td><p>Remove samples from the end of a sequence.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/layers/braindecode.modules.DropPath.html#braindecode.modules.DropPath" title="braindecode.modules.DropPath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DropPath</span></code></a>([drop_prob])</p></td>
<td><p>Drop paths, also known as Stochastic Depth, per sample.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/layers/braindecode.modules.Ensure4d.html#braindecode.modules.Ensure4d" title="braindecode.modules.Ensure4d"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Ensure4d</span></code></a>(*args, **kwargs)</p></td>
<td><p>Ensure the input tensor has 4 dimensions.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/layers/braindecode.modules.SubjectLayers.html#braindecode.modules.SubjectLayers" title="braindecode.modules.SubjectLayers"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubjectLayers</span></code></a>(in_channels, out_channels, ...)</p></td>
<td><p>Per-subject linear transformation layer.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/layers/braindecode.modules.TimeDistributed.html#braindecode.modules.TimeDistributed" title="braindecode.modules.TimeDistributed"><code class="xref py py-obj docutils literal notranslate"><span class="pre">TimeDistributed</span></code></a>(module)</p></td>
<td><p>Apply module on multiple windows.</p></td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="linear">
<h3>Linear<a class="headerlink" href="#linear" title="Link to this heading">#</a></h3>
<p>These modules implement linear layers with various constraints and initializations. They
include linear layers with max’norm constraints and linear layers with specific
initializations.</p>
<p><code class="xref py py-mod docutils literal notranslate"><span class="pre">braindecode.modules.linear</span></code>:</p>
<div class="pst-scrollable-table-container"><table class="autosummary longtable table">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/linear/braindecode.modules.LinearWithConstraint.html#braindecode.modules.LinearWithConstraint" title="braindecode.modules.LinearWithConstraint"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LinearWithConstraint</span></code></a>(*args[, max_norm])</p></td>
<td><p>Linear layer with max-norm constraint on the weights.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/linear/braindecode.modules.MaxNormLinear.html#braindecode.modules.MaxNormLinear" title="braindecode.modules.MaxNormLinear"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaxNormLinear</span></code></a>(in_features, out_features[, ...])</p></td>
<td><p>Linear layer with MaxNorm constraining on weights.</p></td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="stats">
<h3>Stats<a class="headerlink" href="#stats" title="Link to this heading">#</a></h3>
<p>These modules implement statistical layers, including layers for calculating the mean,
standard deviation, and variance of input data. They also include layers for calculating
the log power and log variance of input data. Mostly used on FilterBank models.</p>
<p><code class="xref py py-mod docutils literal notranslate"><span class="pre">braindecode.modules.stats</span></code>:</p>
<div class="pst-scrollable-table-container"><table class="autosummary longtable table">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/stats/braindecode.modules.StatLayer.html#braindecode.modules.StatLayer" title="braindecode.modules.StatLayer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">StatLayer</span></code></a>(stat_fn, dim[, keepdim, ...])</p></td>
<td><p>Generic layer to compute a statistical function along a specified dimension.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="pst-scrollable-table-container"><table class="autosummary longtable table">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/stats/braindecode.modules.LogPowerLayer.html#braindecode.modules.LogPowerLayer" title="braindecode.modules.LogPowerLayer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LogPowerLayer</span></code></a></p></td>
<td><p>Generic layer to compute a statistical function along a specified dimension.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/stats/braindecode.modules.LogVarLayer.html#braindecode.modules.LogVarLayer" title="braindecode.modules.LogVarLayer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LogVarLayer</span></code></a></p></td>
<td><p>Generic layer to compute a statistical function along a specified dimension.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/stats/braindecode.modules.MaxLayer.html#braindecode.modules.MaxLayer" title="braindecode.modules.MaxLayer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaxLayer</span></code></a></p></td>
<td><p>Generic layer to compute a statistical function along a specified dimension.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/stats/braindecode.modules.MeanLayer.html#braindecode.modules.MeanLayer" title="braindecode.modules.MeanLayer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MeanLayer</span></code></a></p></td>
<td><p>Generic layer to compute a statistical function along a specified dimension.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/stats/braindecode.modules.StdLayer.html#braindecode.modules.StdLayer" title="braindecode.modules.StdLayer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">StdLayer</span></code></a></p></td>
<td><p>Generic layer to compute a statistical function along a specified dimension.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/stats/braindecode.modules.VarLayer.html#braindecode.modules.VarLayer" title="braindecode.modules.VarLayer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">VarLayer</span></code></a></p></td>
<td><p>Generic layer to compute a statistical function along a specified dimension.</p></td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="utilities">
<h3>Utilities<a class="headerlink" href="#utilities" title="Link to this heading">#</a></h3>
<p>These modules implement various utility functions and classes for change to cropped
model.</p>
<p><code class="xref py py-mod docutils literal notranslate"><span class="pre">braindecode.modules.util</span></code>:</p>
<div class="pst-scrollable-table-container"><table class="autosummary longtable table">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/util/braindecode.modules.aggregate_probas.html#braindecode.modules.aggregate_probas" title="braindecode.modules.aggregate_probas"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aggregate_probas</span></code></a>(logits[, n_windows_stride])</p></td>
<td><p>Aggregate predicted probabilities with self-ensembling.</p></td>