86 lines
1.7 KiB
YAML
86 lines
1.7 KiB
YAML
# Not exactly the same as SRGAN in <Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network>
|
|
# With 16 Residual blocks w/o BN
|
|
|
|
#### general settings
|
|
name: 002_SRGANx4_MSRResNetx4Ini_DIV2K
|
|
use_tb_logger: true
|
|
model: srgan
|
|
distortion: sr
|
|
scale: 4
|
|
gpu_ids: [1]
|
|
|
|
#### datasets
|
|
datasets:
|
|
train:
|
|
name: DIV2K
|
|
mode: LQGT
|
|
dataroot_GT: ../datasets/DIV2K/DIV2K800_sub.lmdb
|
|
dataroot_LQ: ../datasets/DIV2K/DIV2K800_sub_bicLRx4.lmdb
|
|
|
|
use_shuffle: true
|
|
n_workers: 6 # per GPU
|
|
batch_size: 16
|
|
GT_size: 128
|
|
use_flip: true
|
|
use_rot: true
|
|
color: RGB
|
|
val:
|
|
name: val_set14
|
|
mode: LQGT
|
|
dataroot_GT: ../datasets/val_set14/Set14
|
|
dataroot_LQ: ../datasets/val_set14/Set14_bicLRx4
|
|
|
|
#### network structures
|
|
network_G:
|
|
which_model_G: MSRResNet
|
|
in_nc: 3
|
|
out_nc: 3
|
|
nf: 64
|
|
nb: 16
|
|
upscale: 4
|
|
network_D:
|
|
which_model_D: discriminator_vgg_128
|
|
in_nc: 3
|
|
nf: 64
|
|
|
|
#### path
|
|
path:
|
|
pretrain_model_G: ../experiments/pretrained_models/MSRResNetx4.pth
|
|
strict_load: true
|
|
resume_state: ~
|
|
|
|
#### training settings: learning rate scheme, loss
|
|
train:
|
|
lr_G: !!float 1e-4
|
|
weight_decay_G: 0
|
|
beta1_G: 0.9
|
|
beta2_G: 0.99
|
|
lr_D: !!float 1e-4
|
|
weight_decay_D: 0
|
|
beta1_D: 0.9
|
|
beta2_D: 0.99
|
|
lr_scheme: MultiStepLR
|
|
|
|
niter: 400000
|
|
warmup_iter: -1 # no warm up
|
|
lr_steps: [50000, 100000, 200000, 300000]
|
|
lr_gamma: 0.5
|
|
|
|
pixel_criterion: l1
|
|
pixel_weight: !!float 1e-2
|
|
feature_criterion: l1
|
|
feature_weight: 1
|
|
gan_type: gan # gan | ragan
|
|
gan_weight: !!float 5e-3
|
|
|
|
D_update_ratio: 1
|
|
D_init_iters: 0
|
|
|
|
manual_seed: 10
|
|
val_freq: !!float 5e3
|
|
|
|
#### logger
|
|
logger:
|
|
print_freq: 100
|
|
save_checkpoint_freq: !!float 5e3
|