To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

README.md 3.26 KB
Newer Older
Ard Kastrati's avatar
Ard Kastrati committed
1
2
# DL-Project

3
Predicting eye gaze with DL
4
5
6
7
    Projects that we try: CNN, InceptionTime, EEGNet, DeepEye



okiss's avatar
okiss committed
8
## Leonhard Settings
zpgeng's avatar
zpgeng committed
9

zpgeng's avatar
zpgeng committed
10
<<<<<<< HEAD
zpgeng's avatar
zpgeng committed
11
12
Please find the files which are related to our model:
	
zpgeng's avatar
zpgeng committed
13
14
15
16
17
18
19
20
	|
	| - CNN -- CNN.py
	| - DeepEye -- deepeye.py
	| - DeepEyeRNN -- deepeyeRNN.py
	| - EEGNet -- eegNet.py
	| - InceptionTime -- inception.py
	| - Xception -- xception.py
	| - ConvNet.py
zpgeng's avatar
zpgeng committed
21
=======
okiss's avatar
okiss committed
22
Please use the command
zpgeng's avatar
zpgeng committed
23
>>>>>>> d38a0ec9a70efa540b2361987cff15fc6042590f
zpgeng's avatar
zpgeng committed
24

okiss's avatar
okiss committed
25
`module load gcc/6.3.0 python_gpu/3.8.5 hdf5/1.10.1`
zpgeng's avatar
zpgeng committed
26

okiss's avatar
okiss committed
27
before training the model. Please make sure that the Tensorflow version should be 2.x.
zpgeng's avatar
zpgeng committed
28

zpgeng's avatar
zpgeng committed
29
<<<<<<< HEAD
zpgeng's avatar
zpgeng committed
30
31
32
33
## Running in the Cluster

For [ETH Leonhard](https://scicomp.ethz.ch/wiki/Python_on_Leonhard) users, you can follow these steps:
	
zpgeng's avatar
zpgeng committed
34
	1. Please use the command `module load gcc/6.3.0 python_gpu/3.8.5 hdf5/1.10.1` before training the model.
zpgeng's avatar
zpgeng committed
35

zpgeng's avatar
zpgeng committed
36
	2. Edit the _data directory_ and __run directory__ where you _saved the datasets_ and __run the code for saving the logs and outputs__.
zpgeng's avatar
zpgeng committed
37
=======
okiss's avatar
okiss committed
38
## model configuration
okiss's avatar
okiss committed
39
40
Please configure the config.py file correctly before running the main.py file:   
  
okiss's avatar
okiss committed
41
config['data_dir']    : indicates the directory where you stored the data  
okiss's avatar
okiss committed
42
config['model']       : indicates the model you want to use. Please choose between 'cnn', 'eegnet', 'inception', 'xception' or 'deepeye'  
okiss's avatar
okiss committed
43
config['downsampled'] : True if you want to use 125 data points per second instead of 500. Default is False  
okiss's avatar
okiss committed
44
45
46
config['split']       : True if you want to run a clustered version of the model, please keep it to False as the clustered version is inneficient. The cluster used in this case is defined in the file cluster.py  

## Job submission
zpgeng's avatar
zpgeng committed
47
>>>>>>> d38a0ec9a70efa540b2361987cff15fc6042590f
zpgeng's avatar
zpgeng committed
48

okiss's avatar
okiss committed
49
Please run `bsub -n 4 -W 5:00 -R "rusage[mem=4800, ngpus_excl_p=1]" python ~/dl-project/main.py` on the Leonhard cluster to start the job.
zpgeng's avatar
zpgeng committed
50

okiss's avatar
okiss committed
51
52
53
## read the results
A summary of the model is printed in the lsf. file generated by the Leonhard cluster.  
After each run, a directory with the name 'number'_config['model'] is created under ~/runs, where 'number' refers to the number of the training (different for each run of main.py). It contains the weights of the model, a csv file with the fiting history, the best validation score and an accuracy and loss plot of the training.
zpgeng's avatar
zpgeng committed
54
55


zpgeng's avatar
zpgeng committed
56
<<<<<<< HEAD
zpgeng's avatar
zpgeng committed
57
58
59
60
61
62
63
## Reading the Results

A summary of the model is printed in the `experiment_[your_model]` file generated by the Leonhard cluster.

After each run, a directory with the name `'number'_config['model']` is created under the run directory, where 'number' refers to the time stamp of the training (different for each run of main.py). It contains the weights of the model, a .csv file with the fiting history, the best validation score and an accuracy and loss plot of the training.


zpgeng's avatar
zpgeng committed
64
## DeepEye3 Tuning (deprecated)
zpgeng's avatar
zpgeng committed
65
=======
okiss's avatar
okiss committed
66
## deepEye3 tuning
zpgeng's avatar
zpgeng committed
67
>>>>>>> d38a0ec9a70efa540b2361987cff15fc6042590f
zpgeng's avatar
zpgeng committed
68
69
70
71
72
73
74
75
76
77
78
79

nb_filter: [32, 64]

depth: [9, 12, 20]

kernel_size:[40, 20]

residual_jump: [3, 4]

Large depth causes overfitting, same for the number of filters. Kernel size seems to have tiny affect on validation. Residual jump for 4 (i.e. `depth % (res_jump) == (res_jump - 1)`) is not so good in our task, but I think it would be useful for future tasks.

The best setting is **nb_filter == 32, depth == 9, kernel_size == 40, res_jump == 3**
80