raycv/configs/synthesizers/CyCleGAN.yml
2020-09-06 10:34:52 +08:00

104 lines
2.1 KiB
YAML

name: horse2zebra-CyCleGAN
engine: CyCleGAN
result_dir: ./result
max_pairs: 266800
misc:
random_seed: 324
handler:
clear_cuda_cache: False
set_epoch_for_dist_sampler: True
checkpoint:
epoch_interval: 1 # checkpoint once per `epoch_interval` epoch
n_saved: 2
tensorboard:
scalar: 100 # log scalar `scalar` times per epoch
image: 2 # log image `image` times per epoch
model:
generator:
_type: CyCle-Generator
in_channels: 3
out_channels: 3
base_channels: 64
num_blocks: 9
padding_mode: reflect
norm_type: IN
discriminator:
_type: PatchDiscriminator
in_channels: 3
base_channels: 64
loss:
gan:
loss_type: lsgan
weight: 1.0
real_label_val: 1.0
fake_label_val: 0.0
cycle:
level: 1
weight: 10.0
id:
level: 1
weight: 0
optimizers:
generator:
_type: Adam
lr: 2e-4
betas: [ 0.5, 0.999 ]
discriminator:
_type: Adam
lr: 2e-4
betas: [ 0.5, 0.999 ]
data:
train:
scheduler:
start_proportion: 0.5
target_lr: 0
buffer_size: 50
dataloader:
batch_size: 6
shuffle: True
num_workers: 2
pin_memory: True
drop_last: True
dataset:
_type: GenerationUnpairedDataset
root_a: "/data/i2i/horse2zebra/trainA"
root_b: "/data/i2i/horse2zebra/trainB"
random_pair: True
pipeline:
- Load
- Resize:
size: [ 286, 286 ]
- RandomCrop:
size: [ 256, 256 ]
- RandomHorizontalFlip
- ToTensor
- Normalize:
mean: [ 0.5, 0.5, 0.5 ]
std: [ 0.5, 0.5, 0.5 ]
test:
dataloader:
batch_size: 4
shuffle: False
num_workers: 1
pin_memory: False
drop_last: False
dataset:
_type: GenerationUnpairedDataset
root_a: "/data/i2i/horse2zebra/testA"
root_b: "/data/i2i/horse2zebra/testB"
random_pair: False
pipeline:
- Load
- Resize:
size: [ 256, 256 ]
- ToTensor
- Normalize:
mean: [ 0.5, 0.5, 0.5 ]
std: [ 0.5, 0.5, 0.5 ]