val_noise_power_range=(5, 5), inpainting_train_range=(70, 70), inpainting_val_range=(70, 70), ) ] train_eval_grid( job_name, train_dncnn_denoising, eval_dncnn_denoising, parameters, to_grid=False, timeout_train=20, n_gpus_train=1, timeout_eval=2, n_gpus_eval=1, # timeout=10, # n_gpus=1, project='mdeq', params_to_ignore=[ 'grad_clipping', 'n_val', 'train_noise_power_range', 'val_noise_power_range', 'inpainting_train_range', 'inpainting_val_range', ], val_noise_powers=[5], inpainting_range=(70, 70), no_force_32=True, )
restart_from=48, ) parameters = [] for i_run in range(n_runs): parameters += [ dict(seed=i_run, shine=True, **base_params), dict(seed=i_run, fpn=True, **base_params), ] res_all = train_eval_grid( job_name, train_classifier, evaluate_classifier, parameters, to_grid=False, timeout_train=100, n_gpus_train=n_gpus, timeout_eval=2, n_gpus_eval=n_gpus, project='shine', params_to_ignore=['n_epochs', 'save_at', 'restart_from'], torch=True, ) perf_orig = [ res for (res, params) in zip(res_all, parameters) if not params.get('shine', False) and not params.get('fpn', False) ] perf_shine = [ res for (res, params) in zip(res_all, parameters) if params.get('shine', False) ]
) for model_name, model_config in models.items() ] eval_results, run_ids = train_eval_grid( # run_ids = ['dncnn-relu_1607341394', 'dcnnn-relu-bn_1607346862'] # eval_results = eval_grid( job_name, train, evaluate, parameter_grid, # run_ids=run_ids, n_samples_eval=n_samples_eval, timeout_train=20, n_gpus_train=4, timeout_eval=4, n_gpus_eval=1, # n_samples=n_samples_eval, # timeout=10, # n_gpus=1, to_grid=False, patch_size=patch_size_eval, # just for eval batch_size=batch_size_eval, # just for eval noise_config=noise_config_eval, # just for eval mode='bsd68', # just for eval project='soft_thresholding', return_run_ids=True, no_force_32=True, ) print(eval_results)
run_ids = [ 'xpdnet_sense__af8_i24_compound_mssim_rf_smb_MWCNNbig_1612431469', 'xpdnet_sense__af4_i24_compound_mssim_rf_smb_MWCNNbig_1612431769', ] eval_results, run_ids = train_eval_grid( # eval_results = eval_grid( job_name, train_xpdnet, evaluate_xpdnet, parameter_grid, # run_ids=run_ids, n_samples_eval=50, timeout_train=20, n_gpus_train=batch_size if batch_size else 1, timeout_eval=20, n_gpus_eval=1, # n_samples=50, # timeout=10, # n_gpus=1, to_grid=False, return_run_ids=True, checkpoints_train=19, # one checkpoint every 5 epochs resume_checkpoint=5, resume_run_run_ids=run_ids, params_to_ignore=['batch_size', 'use_mixed_precision', 'model_size'], project='fastmri4', ) print(eval_results) infer_grid(
refine_big=refine_big, af=4, loss=loss, mask_type='equidistant', ) for _, model_size, model_fun, kwargs, _, n_scales, res in model_specs ] eval_results = train_eval_grid( # run_ids = [ # 'xpdnet_sense__af8_CORPD_FBK_compound_mssim_rf_smb_MWCNNmedium_1604901311', # 'xpdnet_sense__af4_CORPD_FBK_compound_mssim_rf_smb_MWCNNmedium_1604901311', # ] # eval_results = eval_grid( job_name, train_xpdnet, evaluate_xpdnet, parameter_grid, # run_ids=run_ids, n_samples_eval=100, timeout_train=100, n_gpus_train=1, timeout_eval=10, n_gpus_eval=1, # n_samples=100, # timeout=10, # n_gpus=1, to_grid=False, params_to_ignore=['model_size']) print(eval_results)
from jean_zay.submitit.general_submissions import train_eval_grid, eval_grid job_name = 'dncnn_denoise' parameters = dict( n_val=[20], grad_clipping=[100], fixed_lr=[True], loss=['mae'], n_epochs=[5000], noise_conditionning=[True, False], noise_residual_weighting=[True, False], ) train_eval_grid( job_name, train_dncnn_denoising, eval_dncnn_denoising, parameters, # run_ids=[None], to_grid=True, timeout_train=60, n_gpus_train=1, timeout_eval=2, n_gpus_eval=1, # timeout=10, # n_gpus=1, project='mdeq', params_to_ignore=['grad_clipping', 'n_val'], val_noise_powers=[15, 25, 50], no_force_32=True, )
lr=1e-4, loss='mae', ) for model_name, model_config in models.items() ] eval_results_50, run_ids = train_eval_grid( # eval_results = eval_grid( job_name, train, evaluate, parameter_grid, n_samples_eval=n_samples_eval, timeout_train=30, n_gpus_train=4, timeout_eval=4, n_gpus_eval=1, # n_samples=200, # timeout=10, # n_gpus=1, to_grid=False, patch_size=patch_size_eval, # just for eval batch_size=batch_size_eval, # just for eval noise_config=noise_config_eval, # just for eval mode='bsd68', # just for eval project='soft_thresholding', return_run_ids=True, ) eval_res = [] for noise_level in noise_levels[:-1]: noise_config_eval = dict( noise_input=True,
params = [ dict(use_mixed_precision=[True], model=['pdnet'], **base_params), ] run_ids = [ 'ncpdnet_3d___radial_stacks_mse_dcomp_1614707627', 'ncpdnet_3d___spiral_stacks_mse_dcomp_1614707626', ] eval_results = train_eval_grid( # eval_results = eval_grid( '3d_nc', train_ncnet_multinet, evaluate_nc_multinet, params, # run_ids=run_ids, n_gpus_train=1, timeout_train=60, n_gpus_eval=1, n_samples_eval=100, # timeout=20, # n_gpus=1, params_to_ignore=['use_mixed_precision', 'scale_factor'], checkpoints_train=7, resume_checkpoint=6, resume_run_run_ids=run_ids, project='fastmri4', ) print(eval_results)
n_primal=n_primal, contrast=contrast, n_epochs=n_epochs, n_samples=n_samples, af=4, loss=loss, ) for _, model_size, model_fun, kwargs, _, n_scales, res in model_specs ] eval_results = train_eval_grid( job_name, train_xpdnet, evaluate_xpdnet, parameter_grid, n_samples_eval=100, timeout_train=60, n_gpus_train=1, timeout_eval=10, n_gpus_eval=1, to_grid=False, params_to_ignore=['model_size'], ) df_results = pd.DataFrame(columns='model_name model_size psnr ssim'.split()) for (name, model_size, _, _, _, _, _), eval_res in zip(model_specs, eval_results): df_results = df_results.append(dict( model_name=name, model_size=model_size, psnr=eval_res[0][0],