/EEG-Finger-Predictor

First project of the EPFL Spring 2018 Deep Learning Class

Primary LanguageJupyter Notebook

EEG-Finger-Predictor

First project of the EPFL Spring 2018 Deep Learning Class

Dependencies

  • Python 3.5.4
  • PyTorch 3.0.1
  • Numpy 1.13.3
  • Matplotlib 2.0.2

Folder structure

  • src/: Path to all the source code
    • data_handler.py: Contains functionality to load, preprocess and augment the dataset
    • dlc_bci.py: Course provided loader of the BCI dataset
    • models.py: Contains the PyTorch LSTM and CNN model architectures
    • plots.py: Contains functionality to plot training and cross validation loss and accuracy curves
    • test.py: Script to train and test best CNN architecture
    • train_best_lstm.py: Script to train and test best LSTM architecture
    • train_cnn.py: Gridsearch running cross validation over parameter configurations to find best CNN architecture
    • train_lstm.py: Gridsearch running cross validation over parameter configurations to find best LSTM architecture
    • train_mlp.py: Multilayer perceptron baseline
    • train_utils.py: Contains training and K-fold cross validation helper functions
  • data_bci/: Path where data will automatically be downloaded to on the first run
  • README.md

How to run test files

To get the same numerical results as in the report, run the models on a GPU.

To run file that returns the train and test accuracies / losses of the best CNN model run:

$ cd src && python test.py

To run file that returns the train and test accuracies / losses of the best LSTM model run (Takes very long to train if not on a GPU!):

$ cd src && python train_best_lstm.py