nafnet_denoising.yaml 1.3 KB
Newer Older
W
wangna11BD 已提交
1
total_iters: 400000
K
kongdebug 已提交
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
output_dir: output_dir

model:
  name: NAFNetModel
  generator:
    name: NAFNet
    img_channel: 3
    width: 64
    enc_blk_nums: [2, 2, 4, 8]
    middle_blk_num: 12
    dec_blk_nums: [2, 2, 2, 2]
  psnr_criterion:
    name: PSNRLoss

dataset:
  train:
    name: NAFNetTrain
    rgb_dir: data/SIDD/train
W
wangna11BD 已提交
20 21 22
    # TODO fix out of memory for val while training
    num_workers: 0
    batch_size: 8 # 8GPU
K
kongdebug 已提交
23 24 25 26 27
    img_options:
      patch_size: 256
  test:
    name: NAFNetVal
    rgb_dir: data/SIDD/val
W
wangna11BD 已提交
28 29
    # TODO fix out of memory for val while training
    num_workers: 0
K
kongdebug 已提交
30 31 32 33 34 35 36 37 38
    batch_size: 1
    img_options:
      patch_size: 256

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

lr_scheduler:
  name: CosineAnnealingRestartLR
W
wangna11BD 已提交
39 40
  learning_rate: 0.001
  periods: [400000]
K
kongdebug 已提交
41
  restart_weights: [1]
W
wangna11BD 已提交
42
  eta_min: !!float 8e-7
K
kongdebug 已提交
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 69 70 71 72 73 74

validate:
  interval: 5000
  save_img: false

  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: AdamW
  # add parameters of net_name to optim
  # name should in self.nets
  net_names:
    - generator
  weight_decay: 0.0
  beta1: 0.9
  beta2: 0.9
  epsilon: 1e-8

log_config:
  interval: 10
  visiual_interval: 5000

snapshot_config:
  interval: 5000