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

BrainDecode Plot #340

Closed
wants to merge 41 commits into from
Closed

BrainDecode Plot #340

wants to merge 41 commits into from

Conversation

carraraig
Copy link
Collaborator

Add an example of usage of BrainDecode

@bruAristimunha bruAristimunha self-requested a review March 6, 2023 13:00
@bruAristimunha
Copy link
Collaborator

Hi @carraraig,

After carefully considering our problem, I have concluded that the best approach is to avoid modifying the braindecode side.

Upon studying the InputerSetter callback, I have discerned that it presents the most viable alternative. Accordingly, I have devised a new callback that allows us to access the relevant shape information. We may also develop a series of model-specific functions to streamline the process further.

While I acknowledge that there may be room for improvement, I think that we can optimise the parser and setter functions.

@carraraig
Copy link
Collaborator Author

Very nice idea for that! I've only see that if I create the EEGNetV4 as

model = EEGNetv4(
in_chans=1,
n_classes=1,
input_window_samples=100,
)

and as

model = EEGNetv4(
in_chans=X.shape[1],
n_classes=len(events),
input_window_samples=X.shape[2],
)

we get slightly different result, you know why?

@bruAristimunha
Copy link
Collaborator

Hi @carraraig,

It is a good idea set the EEGNetV4 with these dummy values, and it makes sense. I am still thinking about the second problem of defining the pytorch model with a "lazy" approach.

I don't know why )= maybe some deterministic flag?

@bruAristimunha
Copy link
Collaborator

Hi @carraraig and @sylvchev,

Now with InputSetterEEG, we are able to run the ShallowNet. I don't know if this is a good solution, but it is working.

@sylvchev
Copy link
Member

Ok nice, I'll check this

Solving the issue with hardcode variable and changing the way we compare the variable.
@bruAristimunha
Copy link
Collaborator

Very nice idea for that! I've only see that if I create the EEGNetV4 as

model = EEGNetv4( in_chans=1, n_classes=1, input_window_samples=100, )

and as

model = EEGNetv4( in_chans=X.shape[1], n_classes=len(events), input_window_samples=X.shape[2], )

we get slightly different result, you know why?

@carraraig, I change the inputSetterEEG to reinitialise the model instead of changing the input layers. Can you test if the behaviour you reported is gone?

@bruAristimunha bruAristimunha requested a review from sylvchev March 13, 2023 04:15
@carraraig
Copy link
Collaborator Author

Very nice idea for that! I've only see that if I create the EEGNetV4 as
model = EEGNetv4( in_chans=1, n_classes=1, input_window_samples=100, )
and as
model = EEGNetv4( in_chans=X.shape[1], n_classes=len(events), input_window_samples=X.shape[2], )
we get slightly different result, you know why?

@carraraig, I change the inputSetterEEG to reinitialise the model instead of changing the input layers. Can you test if the behaviour you reported is gone?

I've tryed and with the first option the code is not running. Is the same for you?

@carraraig carraraig deleted the branch NeuroTechX:develop March 13, 2023 11:16
@carraraig carraraig closed this Mar 13, 2023
@carraraig carraraig deleted the develop branch March 13, 2023 11:16
@carraraig carraraig mentioned this pull request Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants