diff --git a/configs/animeganv2_pretrain.yaml b/configs/animeganv2_pretrain.yaml index 8098e6a3a309528dac893e58a92bc941d349176b..3e421978577d50c1f7def6b71d5e37b787d9d534 100644 --- a/configs/animeganv2_pretrain.yaml +++ b/configs/animeganv2_pretrain.yaml @@ -42,20 +42,21 @@ dataset: 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] + preprocess: + - name: LoadImageFromFile + key: A + - name: Transforms + input_keys: [A] + pipeline: + - name: ResizeToScale + size: [256, 256] + scale: 32 + interpolation: bilinear + - name: Transpose + - name: Normalize + mean: [127.5, 127.5, 127.5] + std: [127.5, 127.5, 127.5] + keys: [image, image] lr_scheduler: name: LinearDecay diff --git a/configs/ugatit_photo2cartoon.yaml b/configs/ugatit_photo2cartoon.yaml index 689dde75a15f0e012b520c617b5e4084aba7684a..6c2fc65db82cd2287386f92e3edb29d9c4ec4736 100644 --- a/configs/ugatit_photo2cartoon.yaml +++ b/configs/ugatit_photo2cartoon.yaml @@ -78,7 +78,7 @@ dataset: key: A - name: LoadImageFromFile key: B - - name: Transfroms + - name: Transforms input_keys: [A, B] pipeline: - name: Resize diff --git a/docs/en_US/tutorials/animegan.md b/docs/en_US/tutorials/animegan.md index 38aaaf349f9330303dfb328cbf20cf5505f5f723..d216719e147ee77852846a777ba26035643c8c41 100644 --- a/docs/en_US/tutorials/animegan.md +++ b/docs/en_US/tutorials/animegan.md @@ -70,7 +70,7 @@ animedataset 2. After the warmup, we strat to training GAN.: **NOTE:** you must modify the `configs/animeganv2.yaml > pretrain_ckpt ` parameter first! ensure the GAN can reuse the warmup generator model. - Set the `batch size=4` and the `learning rate=0.00002`. Train 30 epochs on a GTX2060S GPU to reproduce the result. For other hyperparameters, please refer to `configs/animeganv2.yaml`. + Set the `batch size=4` and the `learning rate=0.0002`. Train 30 epochs on a GTX2060S GPU to reproduce the result. For other hyperparameters, please refer to `configs/animeganv2.yaml`. ```sh python tools/main.py --config-file configs/animeganv2.yaml ``` diff --git a/docs/zh_CN/tutorials/animegan.md b/docs/zh_CN/tutorials/animegan.md index bc3d5aa950bd2a0f229b29d2fb319fd9c8f2d6c5..3c86beca5873d0dbf495d74ff0e0bbd188c8c12f 100644 --- a/docs/zh_CN/tutorials/animegan.md +++ b/docs/zh_CN/tutorials/animegan.md @@ -70,7 +70,7 @@ animedataset 1. 预热模型完成后,训练风格迁移模型: **注意:** 必须先修改在`configs/animeganv2.yaml`中的`pretrain_ckpt`参数,确保指向正确的 **预热模型权重路径** - 设置`batch size=4`,`learning rate=0.00002`,在一个 GTX2060S GPU上训练30个epoch即可获得较好的效果,其他超参数请参考`configs/animeganv2.yaml`。 + 设置`batch size=4`,`learning rate=0.0002`,在一个 GTX2060S GPU上训练30个epoch即可获得较好的效果,其他超参数请参考`configs/animeganv2.yaml`。 ```sh python tools/main.py --config-file configs/animeganv2.yaml