braindecode 0.1.8__tar.gz → 0.1.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {Braindecode-0.1.8 → Braindecode-0.1.9}/Braindecode.egg-info/PKG-INFO +1 -1
- {Braindecode-0.1.8 → Braindecode-0.1.9}/PKG-INFO +1 -1
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/datautil/signalproc.py +1 -2
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/models/deep4.py +15 -6
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/conf.py +4 -2
- Braindecode-0.1.9/docs/notebooks/BBCI_Data_Trialwise.ipynb +839 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/setup.py +1 -1
- Braindecode-0.1.8/docs/notebooks/BBCI_Data_Trialwise.ipynb +0 -780
- {Braindecode-0.1.8 → Braindecode-0.1.9}/Braindecode.egg-info/SOURCES.txt +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/Braindecode.egg-info/dependency_links.txt +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/Braindecode.egg-info/not-zip-safe +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/Braindecode.egg-info/requires.txt +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/Braindecode.egg-info/top_level.txt +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/LICENSE.txt +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/MANIFEST.in +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/README.rst +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/__init__.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/datasets/__init__.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/datasets/bbci.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/datasets/bcic_iv_2a.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/datasets/multiple.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/datasets/sensor_positions.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/datautil/__init__.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/datautil/iterators.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/datautil/signal_target.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/datautil/splitters.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/datautil/trial_segment.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/datautil/util.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/experiments/__init__.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/experiments/experiment.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/experiments/monitors.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/experiments/stopcriteria.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/mne_ext/__init__.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/mne_ext/signalproc.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/models/__init__.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/models/eegnet.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/models/shallow_fbcsp.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/models/util.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/torch_ext/__init__.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/torch_ext/constraints.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/torch_ext/functions.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/torch_ext/init.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/torch_ext/losses.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/torch_ext/modules.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/torch_ext/util.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/util.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/visualization/__init__.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/visualization/perturbation.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/braindecode/visualization/plot.py +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/Makefile +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/index.rst +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/notebooks/BBCI_Data.ipynb +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/notebooks/BBCI_Data_Start_Stop.ipynb +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/notebooks/Cropped_Decoding.ipynb +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/notebooks/Experiment_Class.ipynb +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/notebooks/TrialWise_Decoding.ipynb +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/notebooks/visualization/Perturbation.ipynb +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/source/braindecode.datasets.rst +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/source/braindecode.datautil.rst +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/source/braindecode.experiments.rst +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/source/braindecode.mne_ext.rst +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/source/braindecode.models.rst +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/source/braindecode.rst +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/source/braindecode.torch_ext.rst +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/source/braindecode.visualization.rst +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/docs/source/modules.rst +0 -0
- {Braindecode-0.1.8 → Braindecode-0.1.9}/setup.cfg +0 -0
|
@@ -17,7 +17,7 @@ def exponential_running_standardize(data, factor_new=0.001,
|
|
|
17
17
|
:math:`m_t=\mathrm{factornew} \cdot mean(x_t) + (1 - \mathrm{factornew}) \cdot m_{t-1}`.
|
|
18
18
|
|
|
19
19
|
Then, compute exponential running variance :math:`v_t` at time `t` as
|
|
20
|
-
:math:`
|
|
20
|
+
:math:`v_t=\mathrm{factornew} \cdot (m_t - x_t)^2 + (1 - \mathrm{factornew}) \cdot v_{t-1}`.
|
|
21
21
|
|
|
22
22
|
Finally, standardize the data point :math:`x_t` at time `t` as:
|
|
23
23
|
:math:`x'_t=(x_t - m_t) / max(\sqrt{v_t}, eps)`.
|
|
@@ -214,4 +214,3 @@ def filter_is_stable(a):
|
|
|
214
214
|
"a: {:s}".format(str(a)))
|
|
215
215
|
# from http://stackoverflow.com/a/8812737/1469195
|
|
216
216
|
return np.all(np.abs(np.roots(a))<1)
|
|
217
|
-
|
|
@@ -45,7 +45,8 @@ class Deep4Net(object):
|
|
|
45
45
|
double_time_convs=False,
|
|
46
46
|
split_first_layer=True,
|
|
47
47
|
batch_norm=True,
|
|
48
|
-
batch_norm_alpha=0.1
|
|
48
|
+
batch_norm_alpha=0.1,
|
|
49
|
+
stride_before_pool=False):
|
|
49
50
|
if final_conv_length == 'auto':
|
|
50
51
|
assert input_time_length is not None
|
|
51
52
|
|
|
@@ -53,6 +54,12 @@ class Deep4Net(object):
|
|
|
53
54
|
del self.self
|
|
54
55
|
|
|
55
56
|
def create_network(self):
|
|
57
|
+
if self.stride_before_pool:
|
|
58
|
+
conv_stride = self.pool_time_stride
|
|
59
|
+
pool_stride = 1
|
|
60
|
+
else:
|
|
61
|
+
conv_stride = 1
|
|
62
|
+
pool_stride = self.pool_time_stride
|
|
56
63
|
pool_class_dict = dict(max=nn.MaxPool2d, mean=AvgPool2dWithConv)
|
|
57
64
|
first_pool_class = pool_class_dict[self.first_pool_mode]
|
|
58
65
|
later_pool_class = pool_class_dict[self.later_pool_mode]
|
|
@@ -66,14 +73,15 @@ class Deep4Net(object):
|
|
|
66
73
|
stride=1, ))
|
|
67
74
|
model.add_module('conv_spat',
|
|
68
75
|
nn.Conv2d(self.n_filters_time, self.n_filters_spat,
|
|
69
|
-
(1, self.in_chans),
|
|
76
|
+
(1, self.in_chans),
|
|
77
|
+
stride=(conv_stride, 1),
|
|
70
78
|
bias=not self.batch_norm))
|
|
71
79
|
n_filters_conv = self.n_filters_spat
|
|
72
80
|
else:
|
|
73
81
|
model.add_module('conv_time',
|
|
74
82
|
nn.Conv2d(self.in_chans, self.n_filters_time,
|
|
75
83
|
(self.filter_time_length, 1),
|
|
76
|
-
stride=1,
|
|
84
|
+
stride=(conv_stride, 1),
|
|
77
85
|
bias=not self.batch_norm))
|
|
78
86
|
n_filters_conv = self.n_filters_time
|
|
79
87
|
if self.batch_norm:
|
|
@@ -86,7 +94,7 @@ class Deep4Net(object):
|
|
|
86
94
|
model.add_module('pool',
|
|
87
95
|
first_pool_class(
|
|
88
96
|
kernel_size=(self.pool_time_length, 1),
|
|
89
|
-
stride=(
|
|
97
|
+
stride=(pool_stride, 1)))
|
|
90
98
|
model.add_module('pool_nonlin', Expression(self.first_pool_nonlin))
|
|
91
99
|
|
|
92
100
|
def add_conv_pool_block(model, n_filters_before,
|
|
@@ -97,7 +105,8 @@ class Deep4Net(object):
|
|
|
97
105
|
model.add_module('conv' + suffix.format(block_nr),
|
|
98
106
|
nn.Conv2d(n_filters_before, n_filters,
|
|
99
107
|
(filter_length, 1),
|
|
100
|
-
stride=
|
|
108
|
+
stride=(conv_stride, 1),
|
|
109
|
+
bias=not self.batch_norm))
|
|
101
110
|
if self.batch_norm:
|
|
102
111
|
model.add_module('bnorm' + suffix,
|
|
103
112
|
nn.BatchNorm2d(n_filters,
|
|
@@ -110,7 +119,7 @@ class Deep4Net(object):
|
|
|
110
119
|
model.add_module('pool' + suffix,
|
|
111
120
|
later_pool_class(
|
|
112
121
|
kernel_size=(self.pool_time_length, 1),
|
|
113
|
-
stride=(
|
|
122
|
+
stride=(pool_stride, 1)))
|
|
114
123
|
model.add_module('pool_nonlin' + suffix,
|
|
115
124
|
Expression(self.later_pool_nonlin))
|
|
116
125
|
|
|
@@ -21,6 +21,8 @@ import os
|
|
|
21
21
|
import sys
|
|
22
22
|
sys.path.insert(0, os.path.abspath('.'))
|
|
23
23
|
sys.path.insert(0, os.path.abspath('..'))
|
|
24
|
+
import matplotlib
|
|
25
|
+
matplotlib.use('agg')
|
|
24
26
|
|
|
25
27
|
|
|
26
28
|
|
|
@@ -108,9 +110,9 @@ author = 'Robin Tibor Schirrmeister'
|
|
|
108
110
|
# built documents.
|
|
109
111
|
#
|
|
110
112
|
# The short X.Y version.
|
|
111
|
-
version = '0.1.
|
|
113
|
+
version = '0.1.9'
|
|
112
114
|
# The full version, including alpha/beta/rc tags.
|
|
113
|
-
release = '0.1.
|
|
115
|
+
release = '0.1.9'
|
|
114
116
|
|
|
115
117
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
116
118
|
# for a list of supported languages.
|