fp = open("benchmark-%d%s.result" % (common["num_worker"], "-fp16" if common["fp16"] else ""), "w")
for var_name, var_lst in experiments.items():
// set common args
for k, v in common.items():
setattr(args, k, v)
avg_speed = []
fp.write("speed wrt. %s\n" % var_name)
for cvar in var_lst:
// override exp args
After Change
fp = open("benchmark-%d%s.result" % (args.num_worker, "-fp16" if args.fp16 else ""), "w")
for exp_name in experiments:
// set common args
cargs = deepcopy(args)
// set default value
for v in experiments:
setattr(cargs, v, vars(args)["default_%s" % v])
exp_vars = vars(args)["test_%s" % exp_name]
avg_speed = []
fp.write("speed wrt. %s\n" % exp_name)
for cvar in exp_vars: