|
string | train.__version__ = '1.0' |
|
string | train.__author__ = 'Saul Alonso-Monsalve' |
|
string | train.__email__ = "saul.alonso.monsalve@cern.ch" |
|
| train.sess = tf.Session() |
|
| train.init = tf.global_variables_initializer() |
|
| train.stream |
|
| train.stdout |
|
| train.level |
|
| train.config = configparser.ConfigParser() |
|
| train.SEED = int(config['random']['seed']) |
|
| train.SHUFFLE = ast.literal_eval(config['random']['shuffle']) |
|
| train.IMAGES_PATH = config['images']['path'] |
|
| train.VIEWS = int(config['images']['views']) |
|
| train.PLANES = int(config['images']['planes']) |
|
| train.CELLS = int(config['images']['cells']) |
|
| train.STANDARDIZE = ast.literal_eval(config['images']['standardize']) |
|
| train.DATASET_PATH = config['dataset']['path'] |
|
| train.PARTITION_PREFIX = config['dataset']['partition_prefix'] |
|
| train.LABELS_PREFIX = config['dataset']['labels_prefix'] |
|
| train.LOG_PATH = config['log']['path'] |
|
| train.LOG_PREFIX = config['log']['prefix'] |
|
| train.ARCHITECTURE = config['model']['architecture'] |
|
| train.CHECKPOINT_PATH = config['model']['checkpoint_path'] |
|
| train.CHECKPOINT_PREFIX = config['model']['checkpoint_prefix'] |
|
| train.CHECKPOINT_SAVE_MANY = ast.literal_eval(config['model']['checkpoint_save_many']) |
|
| train.CHECKPOINT_SAVE_BEST_ONLY = ast.literal_eval(config['model']['checkpoint_save_best_only']) |
|
| train.CHECKPOINT_PERIOD = int(config['model']['checkpoint_period']) |
|
| train.PARALLELIZE = ast.literal_eval(config['model']['parallelize']) |
|
| train.GPUS = int(config['model']['gpus']) |
|
| train.PRINT_SUMMARY = ast.literal_eval(config['model']['print_summary']) |
|
| train.BRANCHES = ast.literal_eval(config['model']['branches']) |
|
| train.OUTPUTS = int(config['model']['outputs']) |
|
| train.RESUME = ast.literal_eval(config['train']['resume']) |
|
| train.LEARNING_RATE = float(config['train']['lr']) |
|
| train.MOMENTUM = float(config['train']['momentum']) |
|
| train.DECAY = float(config['train']['decay']) |
|
| train.TRAIN_BATCH_SIZE = int(config['train']['batch_size']) |
|
| train.EPOCHS = int(config['train']['epochs']) |
|
| train.EARLY_STOPPING_PATIENCE = int(config['train']['early_stopping_patience']) |
|
| train.WEIGHTED_LOSS_FUNCTION = ast.literal_eval(config['train']['weighted_loss_function']) |
|
| train.CLASS_WEIGHTS_PREFIX = config['train']['class_weights_prefix'] |
|
| train.MAX_QUEUE_SIZE = int(config['train']['max_queue_size']) |
|
| train.VALIDATION_FRACTION = float(config['validation']['fraction']) |
|
| train.VALIDATION_BATCH_SIZE = int(config['validation']['batch_size']) |
|
dictionary | train.TRAIN_PARAMS |
|
dictionary | train.VALIDATION_PARAMS |
|
dictionary | train.partition = {'train' : [], 'validation' : [], 'test' : []} |
|
dictionary | train.labels = {} |
|
| train.class_weights = pickle.load(class_weights_file) |
|
| train.training_generator = DataGenerator(**TRAIN_PARAMS).generate(labels, partition['train'], True) |
|
| train.validation_generator = DataGenerator(**VALIDATION_PARAMS).generate(labels, partition['validation'], True) |
|
| train.opt = optimizers.SGD(lr=LEARNING_RATE, momentum=MOMENTUM, decay=DECAY, nesterov=True) |
|
list | train.files = [f for f in os.listdir(CHECKPOINT_PATH) if os.path.isfile(os.path.join(CHECKPOINT_PATH, f))] |
|
| train.reverse |
|
| train.r = re.compile(CHECKPOINT_PREFIX[1:] + '-.*-.*.h5') |
|
string | train.filename = CHECKPOINT_PATH+'/' |
|
| train.sequential_model |
|
list | train.input_shape = [PLANES, CELLS, 1] |
|
| train.aux_model = networks.create_model(network=ARCHITECTURE, input_shape=input_shape) |
|
int | train.weight_decay = 1 |
|
list | train.x = [None]*OUTPUTS |
|
| train.use_bias |
|
| train.False |
|
| train.kernel_regularizer |
|
| train.activation |
|
| train.name |
|
| train.model = multi_gpu_model(sequential_model, gpus=GPUS, cpu_relocation=True) |
|
| train.num_outputs = len(sequential_model.output_names) |
|
dictionary | train.model_loss = {'categories':my_losses.masked_loss_categorical} |
|
| train.loss |
|
| train.optimizer |
|
| train.metrics |
|
string | train.filepath = CHECKPOINT_PATH+CHECKPOINT_PREFIX+'.h5' |
|
string | train.monitor_acc = 'val_acc' |
|
string | train.monitor_loss = 'val_loss' |
|
| train.checkpoint = my_callbacks.ModelCheckpointDetached(filepath, monitor=monitor_acc, verbose=1, save_best_only=CHECKPOINT_SAVE_BEST_ONLY, save_weights_only=False, mode='max', period=CHECKPOINT_PERIOD) |
|
| train.lr_reducer = ReduceLROnPlateau(monitor=monitor_acc, mode='max', factor=0.1, cooldown=0, patience=10, min_lr=0.5e-6, verbose=1) |
|
| train.early_stopping = EarlyStopping(monitor=monitor_acc, patience=EARLY_STOPPING_PATIENCE, mode='auto') |
|
| train.csv_logger = CSVLogger(LOG_PATH + LOG_PREFIX + '.log', append=RESUME) |
|
| train.my_callback = my_callbacks.MyCallback() |
|
list | train.callbacks_list = [lr_reducer, checkpoint, early_stopping, csv_logger, my_callback] |
|
int | train.initial_epoch = int(re.search(r'\d+', logfile.read().split('\n')[-2]).group())+1 |
|
| train.validation_data = validation_generator |
|
| train.validation_steps = len(partition['validation'])//VALIDATION_BATCH_SIZE |
|
| train.generator |
|
| train.steps_per_epoch |
|
| train.epochs |
|
| train.class_weight |
|
| train.callbacks |
|
| train.max_queue_size |
|
| train.verbose |
|
| train.use_multiprocessing |
|
| train.workers |
|