main.py 720 Bytes
Newer Older
1
from config import config
okiss's avatar
okiss committed
2
from ensemble import run
3
import numpy as np
okiss's avatar
okiss committed
4
import scipy
okiss's avatar
okiss committed
5
from scipy import io
okiss's avatar
okiss committed
6
import h5py
okiss's avatar
okiss committed
7
8
import logging
import time
9

10
def main():
Ard Kastrati's avatar
Ard Kastrati committed
11
12
    logging.basicConfig(filename=config['info_log'], level=logging.INFO)
    logging.info('Started the Logging')
13
    start_time = time.time()
14
    # try:
okiss's avatar
okiss committed
15
    trainX, trainY = IOHelper.get_mat_data(config['data_dir'], verbose=True)
okiss's avatar
okiss committed
16
17
18
19
20

    if config['model'] == 'eegnet' or config['model'] == 'eegnet_cluster':
        trainX = np.transpose(trainX, (0, 2, 1))
        logging.info(trainX.shape)
    run(trainX,trainY)
Ard Kastrati's avatar
Ard Kastrati committed
21
22
    logging.info("--- Runtime: %s seconds ---" % (time.time() - start_time))
    logging.info('Finished Logging')
23

24
if __name__=='__main__':
zigeng's avatar
zigeng committed
25
    main()