utils_1.py 365 B

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