DL-Art-School/codes/options/train/train_ESRGAN_blacked.yml
James Betker 44b89330c2 Support inference across batches, support inference on cpu, checkpoint
This is a checkpoint of a set of long tests with reduced-complexity networks. Some takeaways:
1) A full GAN using the resnet discriminator does appear to converge, but the quality is capped.
2) Likewise, a combination GAN/feature loss does not converge. The feature loss is optimized but
    the model appears unable to fight the discriminator, so the G-loss steadily increases.

Going forwards, I want to try some bigger models. In particular, I want to change the generator
to increase complexity and capacity. I also want to add skip connections between the
disc and generator.
2020-05-04 08:48:25 -06:00

86 lines
1.6 KiB
YAML

#### general settings
name: blacked_fix_and_upconv
use_tb_logger: true
model: srgan
distortion: sr
scale: 4
gpu_ids: [0]
amp_opt_level: O1
#### datasets
datasets:
train:
name: vixcloseup
mode: LQGT
dataroot_GT: K:\4k6k\4k_closeup\hr
dataroot_LQ: K:\4k6k\4k_closeup\lr_corrupted
doCrop: false
use_shuffle: true
n_workers: 12 # per GPU
batch_size: 40
target_size: 256
color: RGB
val:
name: adrianna_val
mode: LQGT
dataroot_GT: E:\4k6k\datasets\adrianna\val\hhq
dataroot_LQ: E:\4k6k\datasets\adrianna\val\hr
#### network structures
network_G:
which_model_G: RRDBNet
in_nc: 3
out_nc: 3
nf: 48
nb: 23
network_D:
which_model_D: discriminator_resnet
in_nc: 3
nf: 48
#### path
path:
pretrain_model_G: ../experiments/rrdb_blacked_gan_g.pth
pretrain_model_D: ~
strict_load: true
resume_state: ../experiments/blacked_fix_and_upconv/training_state/9500.state
#### training settings: learning rate scheme, loss
train:
lr_G: !!float 1e-5
weight_decay_G: 0
beta1_G: 0.9
beta2_G: 0.99
lr_D: !!float 4e-5
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: [5000, 20000, 40000, 60000]
lr_gamma: 0.5
mega_batch_factor: 4
pixel_criterion: l1
pixel_weight: !!float 1e-2
feature_criterion: l1
feature_weight: 0
feature_weight_decay: .9
feature_weight_decay_steps: 501
feature_weight_minimum: 0
gan_type: gan # gan | ragan
gan_weight: 1
D_update_ratio: 1
D_init_iters: 997
manual_seed: 10
val_freq: !!float 5e2
#### logger
logger:
print_freq: 50
save_checkpoint_freq: !!float 5e2