invdn_denoising.yaml 1.4 KB
Newer Older
C
CC 已提交
1 2
total_iters: 150000
output_dir: output_dir
C
CC 已提交
3 4 5
# tensor range for function tensor2img
min_max:
  (0., 1.)
C
CC 已提交
6 7 8 9 10 11 12 13 14 15 16 17 18 19

model:
  name: InvDNModel
  generator:
    name: InvDN
    channel_in: 3
    channel_out: 3
    block_num: [8, 8]
    scale: 4
    down_num: 2

dataset:
  train:
    name: InvDNDataset
W
wangna11BD 已提交
20 21
    # TODO fix out of memory for val while training
    num_workers: 0
C
CC 已提交
22 23 24 25 26 27 28 29
    batch_size: 14 # 4 GPUs
    opt:
      phase: train
      scale: 4
      crop_size: 144
      train_dir: data/SIDD_Medium_Srgb_Patches_512/train/
  test:
    name: InvDNDataset
W
wangna11BD 已提交
30 31
    # TODO fix out of memory for val while training
    num_workers: 0
C
CC 已提交
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
    batch_size: 1
    opt:
      phase: test
      scale: 4
      val_dir: data/SIDD_Valid_Srgb_Patches_256/valid/

export_model:
  - {name: 'generator', inputs_num: 1}

lr_scheduler:
  name: MultiStepDecay
  learning_rate: 8e-4 # num_gpu * 2e-4
  milestones: [25000, 50000, 75000, 100000, 125000, 135000, 145000]
  gamma: 0.5

validate:
  interval: 500
  save_img: True

  metrics:
    psnr: # metric name, can be arbitrary
      name: PSNR
      crop_border: 4
      test_y_channel: True
    ssim:
      name: SSIM
      crop_border: 4
      test_y_channel: True

optimizer:
  name: Adam
  # add parameters of net_name to optim
  # name should in self.nets
  net_names:
    - generator
  beta1: 0.9
  beta2: 0.99
69 70
  epsilon: 1e-8
  clip_grad_norm: 10
C
CC 已提交
71 72 73 74 75 76 77

log_config:
  interval: 100
  visiual_interval: 5000

snapshot_config:
  interval: 500