from titan_runtime.parse_logs import get_latest_log from titan_runtime.parse_logs import get_current_accuracy_googlenet import titan_runtime.conf_rt as conf import os if __name__ == "__main__": jobs = os.listdir(conf.net_dir) jobs = [j for j in jobs if 'googlenet' in j] jobs = sorted(jobs) for logdir in jobs: logF = get_latest_log(conf.net_dir + '/' + logdir) if logF is None: continue accuracy_dict = get_current_accuracy_googlenet(logF) print ' net: %s, accuracy: %0.1f, at iter %d' % ( logdir, accuracy_dict['accuracy'] * 100, accuracy_dict['iter'])
if __name__ == "__main__": ''' #TODO: 100-iteration solver cp 100 iteration solver to directory to evaluate run 100-iterations solver (for various numbers of GPUs) parse results ''' #train_dir = '/lustre/atlas/scratch/forresti/csc103/dnn_exploration/nets_nov2015_done/FireNet_8_fireLayers_base_r_64_64_incr_r_64_64_CEratio_0.125_freq_2' train_dir = '/lustre/atlas/scratch/forresti/csc103/dnn_exploration/nets_nov2015_done/FireNet_8_fireLayers_base_64_64_64_incr_64_64_64_freq_2/' n_gpu = 32 gen_solver_prototxt(train_dir, n_gpu) training_cmd = './do_training.sh %s %d' %(train_dir, n_gpu) os.system(training_cmd) #TODO: parse results. latest_log = get_latest_log(train_dir, for_timing=True) time_stats = get_time_per_iter(latest_log) ''' log_fname = '/lustre/atlas/scratch/forresti/csc103/dnn_exploration/nets_nov2015_done/FireNet_8_fireLayers_base_64_64_64_incr_64_64_64_freq_2/train_Mon_2015_12_14__16_07_30.log' time_stats = get_time_per_iter(log_fname) print time_stats '''
f.write(out_st) f.close() if __name__ == "__main__": ''' #TODO: 100-iteration solver cp 100 iteration solver to directory to evaluate run 100-iterations solver (for various numbers of GPUs) parse results ''' #train_dir = '/lustre/atlas/scratch/forresti/csc103/dnn_exploration/nets_nov2015_done/FireNet_8_fireLayers_base_r_64_64_incr_r_64_64_CEratio_0.125_freq_2' train_dir = '/lustre/atlas/scratch/forresti/csc103/dnn_exploration/nets_nov2015_done/FireNet_8_fireLayers_base_64_64_64_incr_64_64_64_freq_2/' n_gpu = 32 gen_solver_prototxt(train_dir, n_gpu) training_cmd = './do_training.sh %s %d' % (train_dir, n_gpu) os.system(training_cmd) #TODO: parse results. latest_log = get_latest_log(train_dir, for_timing=True) time_stats = get_time_per_iter(latest_log) ''' log_fname = '/lustre/atlas/scratch/forresti/csc103/dnn_exploration/nets_nov2015_done/FireNet_8_fireLayers_base_64_64_64_incr_64_64_64_freq_2/train_Mon_2015_12_14__16_07_30.log' time_stats = get_time_per_iter(log_fname) print time_stats '''
from titan_runtime.parse_logs import get_latest_log from titan_runtime.parse_logs import get_current_accuracy import titan_runtime.conf_rt as conf import os if __name__ == "__main__": jobs = os.listdir(conf.net_dir) #jobs = [j for j in jobs if 'NiN' in j] #jobs = [j for j in jobs if not j.startswith('googlenet')] jobs = [j for j in jobs if not 'googlenet' in j] jobs = sorted(jobs) for logdir in jobs: logF = get_latest_log(conf.net_dir + '/' + logdir) if logF is None: continue accuracy_dict = get_current_accuracy(logF) if accuracy_dict is not 'error': if 'accuracy_top5' in accuracy_dict.keys(): print ' net: %s, top1: %0.1f, top5: %0.1f, at iter %d' %(logdir, accuracy_dict['accuracy']*100, accuracy_dict['accuracy_top5']*100, accuracy_dict['iter']) else: print ' net: %s, top1: %0.1f, at iter %d' %(logdir, accuracy_dict['accuracy']*100, accuracy_dict['iter'])