parser.add_argument("--verbose_loss", type=int, default=0,
help="if we need to calculate loss.")
opt = parser.parse_args()
// Load infos
with open(opt.infos_path) as f:
infos = utils.pickle_load(f)
// override and collect parameters
replace = ["input_fc_dir", "input_att_dir", "input_box_dir", "input_label_h5", "input_json", "batch_size", "id"]
ignore = ["start_from"]
for k in vars(infos["opt"]).keys():
if k in replace:
setattr(opt, k, getattr(opt, k) or getattr(infos["opt"], k))
elif k not in ignore:
if not k in vars(opt):
vars(opt).update({k: vars(infos["opt"])[k]}) // copy over options from model