|  | 
|  | train_cnn_augmented_data.parser = argparse.ArgumentParser(description='Run CNN training on patches with a few different hyperparameter sets.') | 
|  | 
|  | train_cnn_augmented_data.help | 
|  | 
|  | train_cnn_augmented_data.default | 
|  | 
|  | train_cnn_augmented_data.args = parser.parse_args() | 
|  | 
|  | train_cnn_augmented_data.config = read_config(args.config) | 
|  | configuration #############################  More... 
 | 
|  | 
|  | train_cnn_augmented_data.CNN_INPUT_DIR = config['training_on_patches']['input_dir'] | 
|  | 
|  | train_cnn_augmented_data.PATCH_SIZE_W | 
|  | 
|  | train_cnn_augmented_data.PATCH_SIZE_D | 
|  | 
|  | train_cnn_augmented_data.img_rows | 
|  | 
|  | train_cnn_augmented_data.img_cols | 
|  | 
|  | train_cnn_augmented_data.batch_size = config['training_on_patches']['batch_size'] | 
|  | 
|  | train_cnn_augmented_data.nb_classes = config['training_on_patches']['nb_classes'] | 
|  | 
|  | train_cnn_augmented_data.nb_epoch = config['training_on_patches']['nb_epoch'] | 
|  | 
| int | train_cnn_augmented_data.nb_pool = 2 | 
|  | 
| string | train_cnn_augmented_data.cfg_name = 'sgd_lorate' | 
|  | 
| int | train_cnn_augmented_data.nb_filters1 = 48 | 
|  | 
| int | train_cnn_augmented_data.nb_conv1 = 5 | 
|  | 
| string | train_cnn_augmented_data.convactfn1 = 'relu' | 
|  | 
| bool | train_cnn_augmented_data.maxpool = False | 
|  | 
| int | train_cnn_augmented_data.nb_filters2 = 0 | 
|  | 
| int | train_cnn_augmented_data.nb_conv2 = 7 | 
|  | 
| string | train_cnn_augmented_data.convactfn2 = 'relu' | 
|  | 
| float | train_cnn_augmented_data.drop1 = 0.2 | 
|  | 
| int | train_cnn_augmented_data.densesize1 = 128 | 
|  | 
| string | train_cnn_augmented_data.actfn1 = 'relu' | 
|  | 
| int | train_cnn_augmented_data.densesize2 = 32 | 
|  | 
| string | train_cnn_augmented_data.actfn2 = 'relu' | 
|  | 
| float | train_cnn_augmented_data.drop2 = 0.2 | 
|  | 
|  | train_cnn_augmented_data.main_input = Input(shape=(img_rows, img_cols, 1), name='main_input') | 
|  | CNN definition ############################.  More... 
 | 
|  | 
|  | train_cnn_augmented_data.x | 
|  | 
|  | train_cnn_augmented_data.em_trk_none = Dense(3, activation='softmax', name='em_trk_none_netout')(x) | 
|  | 
|  | train_cnn_augmented_data.michel = Dense(1, activation='sigmoid', name='michel_netout')(x) | 
|  | 
|  | train_cnn_augmented_data.sgd = SGD(lr=0.01, decay=1e-5, momentum=0.9, nesterov=True) | 
|  | 
|  | train_cnn_augmented_data.model = Model(inputs=[main_input], outputs=[em_trk_none, michel]) | 
|  | 
|  | train_cnn_augmented_data.optimizer | 
|  | 
|  | train_cnn_augmented_data.loss | 
|  | 
|  | train_cnn_augmented_data.loss_weights | 
|  | 
|  | train_cnn_augmented_data.n_training = count_events(CNN_INPUT_DIR, 'training') | 
|  | read data sets ############################  More... 
 | 
|  | 
|  | train_cnn_augmented_data.X_train = np.zeros((n_training, PATCH_SIZE_W, PATCH_SIZE_D, 1), dtype=np.float32) | 
|  | 
|  | train_cnn_augmented_data.EmTrkNone_train = np.zeros((n_training, 3), dtype=np.int32) | 
|  | 
|  | train_cnn_augmented_data.Michel_train = np.zeros((n_training, 1), dtype=np.int32) | 
|  | 
| int | train_cnn_augmented_data.ntot = 0 | 
|  | 
| list | train_cnn_augmented_data.subdirs = [f for f in os.listdir(CNN_INPUT_DIR) if 'training' in f] | 
|  | 
| list | train_cnn_augmented_data.filesX = [f for f in os.listdir(CNN_INPUT_DIR + '/' + dirname) if '_x.npy' in f] | 
|  | 
|  | train_cnn_augmented_data.fnameY = fnameX.replace('_x.npy', '_y.npy') | 
|  | 
|  | train_cnn_augmented_data.dataX = np.load(CNN_INPUT_DIR + '/' + dirname + '/' + fnameX) | 
|  | 
|  | train_cnn_augmented_data.dataY = np.load(CNN_INPUT_DIR + '/' + dirname + '/' + fnameY) | 
|  | 
|  | train_cnn_augmented_data.n = dataY.shape[0] | 
|  | 
|  | train_cnn_augmented_data.n_testing = count_events(CNN_INPUT_DIR, 'testing') | 
|  | 
|  | train_cnn_augmented_data.X_test = np.zeros((n_testing, PATCH_SIZE_W, PATCH_SIZE_D, 1), dtype=np.float32) | 
|  | 
|  | train_cnn_augmented_data.EmTrkNone_test = np.zeros((n_testing, 3), dtype=np.int32) | 
|  | 
|  | train_cnn_augmented_data.Michel_test = np.zeros((n_testing, 1), dtype=np.int32) | 
|  | 
|  | train_cnn_augmented_data.datagen | 
|  | training ###############################  More... 
 | 
|  | 
|  | train_cnn_augmented_data.h | 
|  | 
|  | train_cnn_augmented_data.score | 
|  |