{
  "task": "gan_rw"  //  root/task/images-models-options
  , "model": "plain" // "plain"
  , "gpu_ids": [0]

  , "scale": 1       // broadcast to "netG" if SISR
  , "n_channels": 1  // broadcast to "datasets", 1 for grayscale, 3 for color
  , "sigma": 15      // 15, 25, 50 for DnCNN | [0, 75] for FFDNet and FDnCNN
  , "sigma_test": 15 // 15, 25, 50 for DnCNN and ffdnet

  , "merge_bn": true               // BN for DnCNN
  , "merge_bn_startpoint": 400000  // merge BN after N iterations

  , "path": {
    "root": "denoising"            // "denoising" | "superresolution"
    , "pretrained_netG": null      // path of pretrained model
    , "pretrained_netD": null  // path of pretrained model
  }

  , "datasets": {
    "train": {
      "name": "train_dataset"           // just name
      , "dataset_type": "gan_rw"        
      , "dataroot_H": "trainsets/trainH"// path of H training dataset
      , "dataroot_L": null              // path of L training dataset
      , "H_size": 40                    // patch size 40 | 64 | 96 | 128 | 192
      , "dataloader_shuffle": true
      , "dataloader_num_workers": 0
      , "dataloader_batch_size": 32     // batch size 1 | 16 | 32 | 48 | 64 | 128
    }
    , "test": {
      "name": "test_dataset"            // just name
      , "dataset_type": "gan_rw"         
      , "dataroot_H": "testsets/bsd68_H"  // path of H testing dataset
      , "dataroot_L": null               // path of L testing dataset
    }
  }

  , "netG": {
    "net_type": "gan_rw" 
    , "in_nc": 1        // input channel number
    , "out_nc": 1       // ouput channel number
    , "nc": 64          
    , "nb": 17         
    , "gc": 32          // unused
    , "ng": 2           // unused
    , "reduction" : 16  // unused
    , "act_mode": "BR"  // "BR" for BN+ReLU | "R" for ReLU
    , "upsample_mode": "convtranspose"  // "pixelshuffle" | "convtranspose" | "upconv"
    , "downsample_mode": "strideconv"   // "strideconv" | "avgpool" | "maxpool"

    , "init_type": "orthogonal"         // "orthogonal" | "normal" | "uniform" | "xavier_normal" | "xavier_uniform" | "kaiming_normal" | "kaiming_uniform"
    , "init_bn_type": "uniform"         // "uniform" | "constant"
    , "init_gain": 0.2
  }
  
  , "netD": {
    "net_type": "discriminator_vgg_96" 
    , "in_nc": 1
    , "act_mode": "BL"                 // "BL" means BN+LeakyReLU
    , "base_nc": 64

    , "init_type": "orthogonal" // "orthogonal" | "normal" | "uniform" | "xavier_normal" | "xavier_uniform" | "kaiming_normal" | "kaiming_uniform"
    , "init_bn_type": "uniform" // "uniform" | "constant"
    , "init_gain": 0.2
  }


  , "train": {
    "G_lossfn_type": "l1"               // "l1" preferred | "l2sum" | "l2" | "ssim" 
    , "G_lossfn_weight": 1.0            // default
    
     , "F_lossfn_type": "l1"  
    , "F_lossfn_weight": 1.0
    
    ,"gan_type": "ragan"   
    , "D_lossfn_weight": 5e-3

    , "D_init_iters": 0


    , "G_optimizer_type": "adam"        // fixed, adam is enough
    , "G_optimizer_lr": 1e-4            // learning rate
    , "G_optimizer_clipgrad": null      // unused
    
    , "D_optimizer_type": "adam"
    , "D_optimizer_lr": 1e-5
    , "D_optimizer_wd": 0

    , "G_scheduler_type": "MultiStepLR" // "MultiStepLR" is enough
    , "G_scheduler_milestones": [10000, 20000, 30000, 40000]
    , "G_scheduler_gamma": 0.5
    
    , "D_scheduler_type": "MultiStepLR" // "MultiStepLR" is enough
    , "D_scheduler_milestones": [35000, 60000]
    , "D_scheduler_gamma": 0.5

    , "G_regularizer_orthstep": null    // unused
    , "G_regularizer_clipstep": null    // unused

    , "checkpoint_test": 100           // for testing
    , "checkpoint_save": 100           // for saving model
    , "checkpoint_print": 100           // for print
  }
}
