animeganv2_pretrain.yaml 1.5 KB
Newer Older
郑启航 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
epochs: 2
output_dir: output_dir
con_weight: 1
pretrain_ckpt: null

model:
  name: AnimeGANV2PreTrainModel
  generator:
    name: AnimeGenerator
  discriminator:
    name: AnimeDiscriminator
  gan_mode: lsgan

dataset:
  train:
    name: AnimeGANV2Dataset
    num_workers: 4
    batch_size: 4
    dataroot: data/animedataset
    style: Hayao
    phase: train
    direction: AtoB
    transform_real:
      - name: Transpose
      - name: Normalize
        mean: [127.5, 127.5, 127.5]
        std: [127.5, 127.5, 127.5]
    transform_anime:
      - name: Add
        value: [-4.4346957, -8.665916, 13.100612]
      - name: Transpose
      - name: Normalize
        mean: [127.5, 127.5, 127.5]
        std: [127.5, 127.5, 127.5]
    transform_gray:
      - name: Grayscale
        num_output_channels: 3
      - name: Transpose
      - name: Normalize
        mean: [127.5, 127.5, 127.5]
        std: [127.5, 127.5, 127.5]
  test:
    name: SingleDataset
    dataroot: data/animedataset/test/test_photo
    max_dataset_size: inf
    direction: BtoA
    input_nc: 3
    output_nc: 3
    serial_batches: False
    pool_size: 50
    transforms:
      - name: Resize
        size: [256, 256]
        interpolation: "bicubic" #cv2.INTER_CUBIC
      - name: Transpose
      - name: Normalize
        mean: [127.5, 127.5, 127.5]
        std: [127.5, 127.5, 127.5]

optimizer:
  name: Adam
  beta1: 0.5

lr_scheduler:
  name: linear
  learning_rate: 0.0002
  start_epoch: 100
  decay_epochs: 100

log_config:
  interval: 100
  visiual_interval: 100

snapshot_config:
  interval: 5