Namespaces | Functions | Variables
train_cnn.py File Reference

Go to the source code of this file.

Namespaces

 train_cnn
 

Functions

def train_cnn.save_model (model, name)
 

Variables

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