Help with setting up a Convolutional Neural Network


I’m trying to finish a thesis in biology. The goal is learning to distinguish between different types of thinking process recorded via EEG through a Convolutional Neural Network. I’m using a model provided by geopopos from github: GitHub - geopopos/EEG_convolutional_neural_net: A convolutional neural network developed in python using the Keras machine learning framework used to categorize brain signal based on what a user was looking at when the EEG data was collected.

The problem is I’m not very well versed in neural networks and while I understand their principles and how to set up some simple NNs, I’m not skilled enough to properly get a beast like a CNN to work. I’ve been trying to make it work on my EEG to no avail and tried to make it work on some other EEG provided by Machine Learning Repository (UCI Machine Learning Repository: EEG Steady-State Visual Evoked Potential Signals Data Set), again, to no avail. After the last fiasco I figured it might not be a fault with my EEG recordings but rather with how I worked the model provided by geopopos that prevents me from getting any results.
Namely, I lack understanding on how configure a shapes of the data used within the model, it’s pretty manipulated throughout and I lack understanding in how to efficiently set it up:

model.add(Convolution2D(40, (1,5), activation=“relu”, input_shape=(1,124,32), data_format=“channels_first”))
model.add(Convolution3D(40, (1,124,40), activation=“relu”, data_format=“channels_first”))
model.add(Lambda(lambda x: x ** 2))
model.add(AveragePooling2D((1, 5), (1, 1)))
model.add(Dense(6, activation=“softmax”))

The shape of my data is different and I don’t really understand how to efficiently work all the permutes, reshapes and how to set up shapes for convolutional layers, as well as how to better set up my data.

While I am interested in machine learning and has learned a lot about it, my field is biology and I lack expertise for that right now, and I need more skilled people to help me finish my thesis. I need your help a lot.

Thank you.