config_logger.py 2.04 KB
Newer Older
1
2
3
4
5
6
7
8
9
from config import config
import logging

def log_config():
    if config['run'] == "kerastuner":
        logging.info("Running the keras-tuner")
    else:
        logging.info("Running the ensemble with {} {} models".format(config['ensemble'], config['model']))
    if config['task'] == 'gaze-reg':
Lukas Wolf's avatar
Lukas Wolf committed
10
        logging.info("Training on the gaze regression task")
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
        logging.info("Using data from {}".format(config['dataset']))
        logging.info("Using {} padding".format(config['padding']))
        if config["data_mode"] != "sacc_only":
            logging.info("Using fixations between {} ms and {} ms, 1 sample equals 2ms".format((2 * config['min_fixation']), (2 * config['max_fixation'])))
        if config['data_mode'] != "fix_only":
            logging.info("Using saccades between {} ms and {} ms, 1 sample equals 2ms".format((2 * config['min_saccade']), (2 * config['max_saccade'])))
    elif config['task'] == 'angle-reg':
        logging.info("Running the angle regression task")
        logging.info("Using data from {}".format(config['dataset']))
        logging.info("Using {} padding".format(config['padding']))
        logging.info("Using fixations between {} ms and {} ms, 1 sample equals 2ms".format((2 * config['min_fixation']), (2 * config['max_fixation'])))
        logging.info("Using saccades between {} ms and {} ms, 1 sample equals 2ms".format((2 * config['min_saccade']), (2 * config['max_saccade'])))
    else:
        logging.info("Running the saccade classification (prosaccade) task")
    logging.info("------------------------------------------------------------------------------------")
    logging.info("Model hyperparameters chosen in config.py:")
    logging.info("Learning rate: {}".format(config['learning_rate']))
    logging.info("Regularization: {}".format(config['regularization']))
    logging.info("Batch size: {}".format(config['batch_size']))
    logging.info("Maximal number of epochs per model: {}".format(config['epochs']))
    logging.info("------------------------------------------------------------------------------------")