parser.add_argument('--time_limit', action="store", type=int, default=60) parser.add_argument('--learning_rate', action="store", type=float, default=0.001) parser.add_argument('--train', action="store_true", default=False) args = parser.parse_args() arch = args.arch nx = args.nx ny = args.ny time_limit = args.time_limit learning_rate = args.learning_rate rfc.the_print('Chosen architecture is: ' + args.arch + '; learning rate = ' + str(learning_rate), bgc='green') name = arch + '_' + str(nx) + 'x' + str(ny) model_add = './models/kat7_model_' + name files_list = sorted(glob.glob('../../data/kat7/dataset2/training*.h5')) rfc.the_print('number of files: ' + str(len(files_list))) dpt = rfc.DataProvider(nx=nx, ny=ny, a_min=0, a_max=200, files=files_list, label_name='mask')
from time import time from sklearn.metrics import confusion_matrix parser = argparse.ArgumentParser() parser.add_argument('--arch', required=False, help='choose architecture', type=str, default='0') #parser.add_argument('--trsh', required=False, help='choose threshold', type=float, default=0.1) args = parser.parse_args() arch = 'arch_'+args.arch+'_3class' mode = 'one_hot' thresholds = [1e-10, 0.1] th_labels = [0,1,2] rfc.the_print('Chosen architecture is: '+args.arch,bgc='green') model_add = './models/multiclass_model_'+arch+'_'+mode test_files = sorted(glob.glob('/home/anke/HIDE_simulations/hide_sims_test/calib_1month/*.fits')) rfc.the_print('number of files: '+str(len(test_files))) ws = 400 dp = rfc.DataProvider(files=test_files,label_name='RFI', ny=ws, one_hot=1, thresholds=thresholds, th_labels=th_labels, a_min=0, a_max=200) _,nx,ny,nc = dp(1)[1].shape print(dp(1)[1].shape)