GithubHelp home page GithubHelp logo

Comments (6)

CVxTz avatar CVxTz commented on June 28, 2024

Hello,
The input of get_base_model is (3000, 1) and its output is (64,) , this model should not be used on its own but as part of get_model_cnn.
The input of get_model_cnn is (None, 3000, 1), the submodel that outputs (64, ) is only part of it.

from eeg_classification.

CVxTz avatar CVxTz commented on June 28, 2024

Go here for an explanation : https://towardsdatascience.com/sleep-stage-classification-from-single-channel-eeg-using-convolutional-neural-networks-5c710d92d38e

from eeg_classification.

zizi96 avatar zizi96 commented on June 28, 2024

Ok so I think the issue is with my training input shape, I'm still fairly new to ML.

Am i correct in assuming this code taken from the run-file feeds training samples (of shape 3000,1) into base_model 1 at a time?

train_val, test = [x for x in files if x.split("/")[-1][:5] in train_ids],\
                  [x for x in files if x.split("/")[-1][:5] in test_ids]

train, val = train_test_split(train_val, test_size=0.1, random_state=1337)

train_dict = {k: np.load(k) for k in train}
test_dict = {k: np.load(k) for k in test}
val_dict = {k: np.load(k) for k in val}

from eeg_classification.

CVxTz avatar CVxTz commented on June 28, 2024

No its wrong.
You need to checkout the function "gen" in https://github.com/CVxTz/EEG_classification/blob/master/code/utils.py

from eeg_classification.

zizi96 avatar zizi96 commented on June 28, 2024

I have an idea but its only a guess. I tried generating the data myself to check myself but I don't use Linux. Its very difficult to visualise what gen is doing without knowing exactly what the data into it looks like hence why I would greatly appreciate knowing the shape of what gen outputs.
From there I could learn whats going on with pre-processing via reverse engineering. Thanks for your time.

from eeg_classification.

CVxTz avatar CVxTz commented on June 28, 2024

gen outputs X, Y.
X shape is (batch_size, 100, 3000, 1)
Y shape is (batch_size, 100, 1)
You can double check by calling :
X, Y = next(gen(train))
print(X.shape)
print(Y.shape)

from eeg_classification.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.