pix2pix_cityscapes_2gpus.yaml 1.8 KB
Newer Older
L
LielinJiang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
epochs: 200
output_dir: output_dir
lambda_L1: 100

model:
  name: Pix2PixModel
  generator:
    name: UnetGenerator
    norm_type: batch
    input_nc: 3
    output_nc: 3
    num_downs: 8 #unet256
    ngf: 64
    use_dropout: False
  discriminator:
    name: NLayerDiscriminator
    ndf: 64
    n_layers: 3
    input_nc: 6
    norm_type: batch
  gan_mode: vanilla

dataset:
  train:
L
LielinJiang 已提交
25
    name: PairedDataset
L
LielinJiang 已提交
26 27 28 29 30 31 32 33
    dataroot: data/cityscapes
    phase: train
    max_dataset_size: inf
    direction: BtoA
    input_nc: 3
    output_nc: 3
    serial_batches: False
    pool_size: 0
L
LielinJiang 已提交
34 35 36
    transforms:
      - name: Resize
        size: [286, 286]
L
LielinJiang 已提交
37
        interpolation: 'bicubic' #cv2.INTER_CUBIC
L
LielinJiang 已提交
38 39
        keys: [image, image]
      - name: PairedRandomCrop
L
LielinJiang 已提交
40
        size: [256, 256]
L
LielinJiang 已提交
41 42 43 44
        keys: [image, image]
      - name: PairedRandomHorizontalFlip
        prob: 0.5
        keys: [image, image]
L
LielinJiang 已提交
45
      - name: Transpose
L
LielinJiang 已提交
46 47 48 49 50
        keys: [image, image]
      - name: Normalize
        mean: [127.5, 127.5, 127.5]
        std: [127.5, 127.5, 127.5]
        keys: [image, image]
L
LielinJiang 已提交
51
  test:
L
LielinJiang 已提交
52
    name: PairedDataset
L
LielinJiang 已提交
53 54 55 56 57 58 59 60
    dataroot: data/cityscapes/
    phase: test
    max_dataset_size: inf
    direction: BtoA
    input_nc: 3
    output_nc: 3
    serial_batches: True
    pool_size: 50
L
LielinJiang 已提交
61 62 63
    transforms:
      - name: Resize
        size: [256, 256]
L
LielinJiang 已提交
64
        interpolation: 'bicubic' #cv2.INTER_CUBIC
L
LielinJiang 已提交
65
        keys: [image, image]
L
LielinJiang 已提交
66
      - name: Transpose
L
LielinJiang 已提交
67 68 69 70 71
        keys: [image, image]
      - name: Normalize
        mean: [127.5, 127.5, 127.5]
        std: [127.5, 127.5, 127.5]
        keys: [image, image]
L
LielinJiang 已提交
72 73 74 75

optimizer:
  name: Adam
  beta1: 0.5
L
LielinJiang 已提交
76 77 78 79 80 81

lr_scheduler:
  name: linear
  learning_rate: 0.0004
  start_epoch: 100
  decay_epochs: 100
L
LielinJiang 已提交
82 83 84 85 86 87 88

log_config:
  interval: 100
  visiual_interval: 500

snapshot_config:
  interval: 5