main.py 1.35 KB
Newer Older
1
2
from config import general_params as params
import time
3
4
5
6
7
from CNN import CNN
from utils import IOHelper
from DeepEye import deepEye
from InceptionTime import inception
from EEGNet import eegNet
8

9
10
def main():
    start_time = time.time()
11
    try:
12
        trainX, trainY = IOHelper.get_data(verbose=True)
13
14
15
    except:
        return

16
17
    if params['model'] == 'CNN-1':
        print("Started running CNN-1. If you want to run other methods please choose another model in the config.py file.")
18
        CNN.run(trainX, trainY)
19
20
21

    elif params['model'] == 'InceptionTime':
        print("Started running InceptionTime. If you want to run other methods please choose another model in the config.py file.")
22
        inception.run(trainX=trainX, trainY=trainY)
23
24
25

    elif params['model'] == 'EEGNet':
        print("Started running EEGNet. If you want to run other methods please choose another model in the config.py file.")
26
        eegNet.run(trainX=trainX, trainY=trainY)
27
28
29

    elif params['model'] == 'DeepEye':
        print("Started running DeepEye. If you want to run other methods please choose another model in the config.py file.")
30
        deepEye.run(trainX=trainX, trainY=trainY)
31

32
    else:
Ard Kastrati's avatar
Ard Kastrati committed
33
        print('Cannot start the program. Please choose one model in the config.py file')
34
35
36
37
38

    print("--- Runtime: %s seconds ---" % (time.time() - start_time))

if __name__=='__main__':
    main()