def save_parameters(args, run_name): with open(os.path.join(args.log_path, run_name)+'/parameters.txt', 'w') as f: f.write('num_blocks {}, lr {}, beta1 {} beta2 {}, batch_size {} gamma {} scheduler_step {}'.format( args.num_blocks, args.lr, args.beta1, args.beta2, args.batch_size, args.gamma, args.scheduler_step ))