# 来自 CAL 代码
# Main
Run = ExptPeerRegC10CAL(
{"--is_train": True, # why 居然可以这么写?
"--is_plot_results": False,
"--is_class_resolved": False,
"--is_load": False,
"--exp_name": exp_name,
"--dataset": dataset,
"--netARCH": netARCH,
"--num_classes": 10,
"--lossfunc": lossfunc,
"--optimizer": "SGD",
"--lr": 0.1, # 0.1
"--lr_scheduler": "step",
"--weight_decay": 0.0005,
"--lr_decay_step_size": 60, # 60
"--lr_decay_rate": 0.1, # 0.1
"--batch_size": 128,
"--max_epoch": max_epoch,
"--is_validate": False,
"--val_ratio": 0.0,
"--with_noise": with_noise,
"--noise_label_fname": noise_file,
"--is_peerloss": is_peer,
"--alpha": 0.0,
"--alpha_scheduler": ‘seg‘,
"--alpha_list": alpha_list,
"--milestones": milestones,
"--gpu_idx": gpu_idx,
"--chosen_classes": chosen_classes,
"--sample_weight_path": sample_weight_path,
"--beta_path": None,
},
json_path = json_path,
outputfile= outfile
)
Run.train()
原文:https://www.cnblogs.com/Gelthin2017/p/14723447.html