Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating mne_bids version #586

Merged
merged 25 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d017c00
Updating mne_bids version
brunaafl Apr 29, 2024
4720506
Merge branch 'develop' into fix_bids
bruAristimunha Apr 30, 2024
1462c77
Accepting mne 1.7
brunaafl Apr 30, 2024
092377a
Updating whats new file
brunaafl Apr 30, 2024
768df28
Merge branch 'develop' into fix_bids
bruAristimunha May 2, 2024
7dfddb7
Enforce moabb 1.7
brunaafl May 3, 2024
0558baf
Enforce moabb 1.7
brunaafl May 8, 2024
4f2df9e
Merge branch 'develop' into fix_bids
bruAristimunha May 17, 2024
9c26b63
Adding edfio as a dependency
brunaafl May 17, 2024
8e8a110
Merge branch 'develop' into fix_bids
bruAristimunha May 27, 2024
6430dde
Update pyproject.toml
brunaafl May 27, 2024
1035a93
Update pyproject.toml
bruAristimunha May 27, 2024
94c0f6d
Updating versions: keras, scikeras, tensorflow, h5py
brunaafl May 27, 2024
92c3cea
Updating versions: keras, scikeras, tensorflow, h5py
brunaafl May 27, 2024
c9c838b
Defining tensorflow-io-gcs-filesystem version
brunaafl May 27, 2024
ea1ac0e
Defining tensorflow-io-gcs-filesystem version
brunaafl May 27, 2024
ae644ac
Updating to Keras 3 optimizers
brunaafl May 28, 2024
74e9c81
Updating code Keras3
brunaafl May 28, 2024
b229a72
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 28, 2024
df2e4ba
Updating code Keras3
brunaafl May 28, 2024
458cbff
Merge remote-tracking branch 'origin/fix_bids' into fix_bids
brunaafl May 28, 2024
c10ec6a
Updating to Keras 3 functions
brunaafl May 29, 2024
12b3e3c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 29, 2024
94c1dbf
Merge branch 'develop' into fix_bids
bruAristimunha May 29, 2024
ea62ae6
Merge branch 'develop' into fix_bids
bruAristimunha May 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Bugs
- Fix number of sessions in doc of :class:`moabb.datasets.Sosulski2019` (:gh:`565` by `Pierre Guetschel`_)
- Fix `code` column of :class:`moabb.datasets.CastillosCVEP100` and :class:`moabb.datasets.CastillosCVEP100` (:gh:`567` by `Pierre Guetschel`_)
- MAINT updating the packages pre-release (:gh:`578` by `Bruno Aristimunha`_)
- Fix mne_bids version incompatibility with mne (:gh:`586` by `Bruna Lopes`_)
- Updating the parameters of the SSVEP_TRCA method (:gh:`589` by `Bruno Aristimunha`_)
- Fix and updating the parameters for the benchmark function (:gh:`588` by `Bruno Aristimunha`_)
- Fix :class:`moabb.datasets.preprocessing.SetRawAnnotations` setting incorrect annotations when the dataset's interval does not start at 0 (:gh:`607` by `Pierre Guetschel`_)
Expand Down Expand Up @@ -449,4 +450,5 @@ API changes
.. _Jordy Thielen: https://github.com/thijor
.. _Sebastien Velut: https://github.com/swetbear
.. _Brian Irvine: https://github.com/brianjohannes
.. _Bruna Lopes: https://github.com/brunaafl
.. _Yash Chauhan: https://github.com/jiggychauhi
2 changes: 1 addition & 1 deletion examples/pipelines_DL/Keras_DeepConvNet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pipeline:
loss: "sparse_categorical_crossentropy"
optimizer:
- name: Adam
from: tensorflow.keras.optimizers.legacy
from: tensorflow.keras.optimizers
parameters:
learning_rate: 0.001
epochs: 2
Expand Down
2 changes: 1 addition & 1 deletion examples/pipelines_DL/Keras_EEGITNet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pipeline:
loss: "sparse_categorical_crossentropy"
optimizer:
- name: Adam
from: tensorflow.keras.optimizers.legacy
from: tensorflow.keras.optimizers
parameters:
learning_rate: 0.001
epochs: 2
Expand Down
2 changes: 1 addition & 1 deletion examples/pipelines_DL/Keras_EEGNeX.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pipeline:
loss: "sparse_categorical_crossentropy"
optimizer:
- name: Adam
from: tensorflow.keras.optimizers.legacy
from: tensorflow.keras.optimizers
parameters:
learning_rate: 0.001
epochs: 2
Expand Down
2 changes: 1 addition & 1 deletion examples/pipelines_DL/Keras_EEGNet_8_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pipeline:
loss: "sparse_categorical_crossentropy"
optimizer:
- name: Adam
from: tensorflow.keras.optimizers.legacy
from: tensorflow.keras.optimizers
parameters:
learning_rate: 0.001
epochs: 2
Expand Down
2 changes: 1 addition & 1 deletion examples/pipelines_DL/Keras_EEGTCNet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pipeline:
loss: "sparse_categorical_crossentropy"
optimizer:
- name: Adam
from: tensorflow.keras.optimizers.legacy
from: tensorflow.keras.optimizers
parameters:
learning_rate: 0.001
epochs: 2
Expand Down
2 changes: 1 addition & 1 deletion examples/pipelines_DL/Keras_ShallowConvNet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pipeline:
loss: "sparse_categorical_crossentropy"
optimizer:
- name: Adam
from: tensorflow.keras.optimizers.legacy
from: tensorflow.keras.optimizers
parameters:
learning_rate: 0.001
epochs: 2
Expand Down
28 changes: 15 additions & 13 deletions moabb/pipelines/deep_learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from typing import Any, Dict

import tensorflow as tf
from keras import backend as K
from keras.constraints import max_norm
from keras.layers import (
Activation,
Expand All @@ -31,7 +30,9 @@
Permute,
)
from keras.models import Model, Sequential
from keras.ops import pad
from scikeras.wrappers import KerasClassifier
from tensorflow.keras import backend as K

from moabb.pipelines.utils_deep_model import EEGNet, EEGNet_TC, TCN_block

Expand Down Expand Up @@ -728,15 +729,15 @@ def _keras_build_fn(self, compile_kwargs: Dict[str, Any]):

# ================================

paddings = tf.constant([[0, 0], [0, 0], [3, 0], [0, 0]])
block = tf.pad(block_in, paddings, "CONSTANT")
paddings = [[0, 0], [0, 0], [3, 0], [0, 0]]
block = pad(block_in, paddings, "constant")
block = DepthwiseConv2D(
(1, 4), padding="valid", depth_multiplier=1, dilation_rate=(1, 1)
)(block)
block = BatchNormalization()(block)
block = Activation("elu")(block)
block = Dropout(0.4)(block)
block = tf.pad(block, paddings, "CONSTANT")
block = pad(block, paddings, "constant")
block = DepthwiseConv2D(
(1, 4), padding="valid", depth_multiplier=1, dilation_rate=(1, 1)
)(block)
Expand All @@ -745,15 +746,16 @@ def _keras_build_fn(self, compile_kwargs: Dict[str, Any]):
block = Dropout(self.drop_rate)(block)
block_out = Add()([block_in, block])

paddings = tf.constant([[0, 0], [0, 0], [6, 0], [0, 0]])
block = tf.pad(block_out, paddings, "CONSTANT")
paddings = [[0, 0], [0, 0], [6, 0], [0, 0]]
block = pad(block_out, paddings, "constant")
block = DepthwiseConv2D(
(1, 4), padding="valid", depth_multiplier=1, dilation_rate=(1, 2)
)(block)
block = BatchNormalization()(block)
block = Activation("elu")(block)
block = Dropout(self.drop_rate)(block)
block = tf.pad(block, paddings, "CONSTANT")
print(block.dtype)
block = pad(block, paddings, "constant")
block = DepthwiseConv2D(
(1, 4), padding="valid", depth_multiplier=1, dilation_rate=(1, 2)
)(block)
Expand All @@ -762,15 +764,15 @@ def _keras_build_fn(self, compile_kwargs: Dict[str, Any]):
block = Dropout(self.drop_rate)(block)
block_out = Add()([block_out, block])

paddings = tf.constant([[0, 0], [0, 0], [12, 0], [0, 0]])
block = tf.pad(block_out, paddings, "CONSTANT")
paddings = [[0, 0], [0, 0], [12, 0], [0, 0]]
block = pad(block_out, paddings, "constant")
block = DepthwiseConv2D(
(1, 4), padding="valid", depth_multiplier=1, dilation_rate=(1, 4)
)(block)
block = BatchNormalization()(block)
block = Activation("elu")(block)
block = Dropout(self.drop_rate)(block)
block = tf.pad(block, paddings, "CONSTANT")
block = pad(block, paddings, "constant")
block = DepthwiseConv2D(
(1, 4), padding="valid", depth_multiplier=1, dilation_rate=(1, 4)
)(block)
Expand All @@ -779,15 +781,15 @@ def _keras_build_fn(self, compile_kwargs: Dict[str, Any]):
block = Dropout(self.drop_rate)(block)
block_out = Add()([block_out, block])

paddings = tf.constant([[0, 0], [0, 0], [24, 0], [0, 0]])
block = tf.pad(block_out, paddings, "CONSTANT")
paddings = [[0, 0], [0, 0], [24, 0], [0, 0]]
block = pad(block_out, paddings, "constant")
block = DepthwiseConv2D(
(1, 4), padding="valid", depth_multiplier=1, dilation_rate=(1, 8)
)(block)
block = BatchNormalization()(block)
block = Activation("elu")(block)
block = Dropout(self.drop_rate)(block)
block = tf.pad(block, paddings, "CONSTANT")
block = pad(block, paddings, "constant")
block = DepthwiseConv2D(
(1, 4), padding="valid", depth_multiplier=1, dilation_rate=(1, 8)
)(block)
Expand Down
2 changes: 1 addition & 1 deletion pipelines/Keras_DeepConvNet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipeline:
loss: "sparse_categorical_crossentropy"
optimizer:
- name: Adam
from: tensorflow.keras.optimizers.legacy
from: tensorflow.keras.optimizers
parameters:
learning_rate: 0.001
epochs: 300
Expand Down
2 changes: 1 addition & 1 deletion pipelines/Keras_EEGITNet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipeline:
loss: "sparse_categorical_crossentropy"
optimizer:
- name: Adam
from: tensorflow.keras.optimizers.legacy
from: tensorflow.keras.optimizers
parameters:
learning_rate: 0.001
epochs: 300
Expand Down
2 changes: 1 addition & 1 deletion pipelines/Keras_EEGNeX.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipeline:
loss: "sparse_categorical_crossentropy"
optimizer:
- name: Adam
from: tensorflow.keras.optimizers.legacy
from: tensorflow.keras.optimizers
parameters:
learning_rate: 0.001
epochs: 300
Expand Down
2 changes: 1 addition & 1 deletion pipelines/Keras_EEGNet_8_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipeline:
loss: "sparse_categorical_crossentropy"
optimizer:
- name: Adam
from: tensorflow.keras.optimizers.legacy
from: tensorflow.keras.optimizers
parameters:
learning_rate: 0.001
epochs: 300
Expand Down
2 changes: 1 addition & 1 deletion pipelines/Keras_EEGTCNet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipeline:
loss: "sparse_categorical_crossentropy"
optimizer:
- name: Adam
from: tensorflow.keras.optimizers.legacy
from: tensorflow.keras.optimizers
parameters:
learning_rate: 0.001
epochs: 300
Expand Down
2 changes: 1 addition & 1 deletion pipelines/Keras_ShallowConvNet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipeline:
loss: "sparse_categorical_crossentropy"
optimizer:
- name: Adam
from: tensorflow.keras.optimizers.legacy
from: tensorflow.keras.optimizers
parameters:
learning_rate: 0.001
epochs: 300
Expand Down
Loading
Loading