cyclegan_horse2zebra.yaml 1.5 KB
Newer Older
L
LielinJiang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14
epochs: 200
output_dir: output_dir
lambda_A: 10.0
lambda_B: 10.0
lambda_identity: 0.5

model:
  name: CycleGANModel
  generator:
    name: ResnetGenerator
    output_nc: 3
    n_blocks: 9
    ngf: 64
    use_dropout: False
L
LielinJiang 已提交
15 16
    norm_type: instance
    input_nc: 3
L
LielinJiang 已提交
17 18 19 20
  discriminator:
    name: NLayerDiscriminator
    ndf: 64
    n_layers: 3
L
LielinJiang 已提交
21 22
    norm_type: instance
    input_nc: 3
L
LielinJiang 已提交
23 24 25 26
  gan_mode: lsgan

dataset:
  train:
L
LielinJiang 已提交
27
    name: UnpairedDataset
L
LielinJiang 已提交
28 29 30 31 32 33 34 35
    dataroot: data/horse2zebra
    phase: train
    max_dataset_size: inf
    direction: AtoB
    input_nc: 3
    output_nc: 3
    serial_batches: False
    pool_size: 50
L
LielinJiang 已提交
36 37 38
    transforms:
      - name: Resize
        size: [286, 286]
L
LielinJiang 已提交
39
        interpolation: 'bicubic' #cv2.INTER_CUBIC
L
LielinJiang 已提交
40
      - name: RandomCrop
L
LielinJiang 已提交
41
        size: [256, 256]
L
LielinJiang 已提交
42 43
      - name: RandomHorizontalFlip
        prob: 0.5
L
LielinJiang 已提交
44
      - name: Transpose
L
LielinJiang 已提交
45 46 47
      - name: Normalize
        mean: [127.5, 127.5, 127.5]
        std: [127.5, 127.5, 127.5]
L
LielinJiang 已提交
48 49 50 51 52 53 54 55 56
  test:
    name: SingleDataset
    dataroot: data/horse2zebra/testA
    max_dataset_size: inf
    direction: AtoB
    input_nc: 3
    output_nc: 3
    serial_batches: False
    pool_size: 50
L
LielinJiang 已提交
57
    transforms:
L
LielinJiang 已提交
58 59
      - name: Resize
        size: [256, 256]
L
LielinJiang 已提交
60 61
        interpolation: 'bicubic' #cv2.INTER_CUBIC
      - name: Transpose
L
LielinJiang 已提交
62 63 64
      - name: Normalize
        mean: [127.5, 127.5, 127.5]
        std: [127.5, 127.5, 127.5]
L
LielinJiang 已提交
65 66 67 68

optimizer:
  name: Adam
  beta1: 0.5
L
LielinJiang 已提交
69 70 71 72 73 74

lr_scheduler:
  name: linear
  learning_rate: 0.0002
  start_epoch: 100
  decay_epochs: 100
L
LielinJiang 已提交
75 76 77 78 79 80 81

log_config:
  interval: 100
  visiual_interval: 500

snapshot_config:
  interval: 5