未验证 提交 b5dc26ca 编写于 作者: L LielinJiang 提交者: GitHub

fix bugs and update docs (#187)

上级 925bd9c7
...@@ -42,20 +42,21 @@ dataset: ...@@ -42,20 +42,21 @@ dataset:
test: test:
name: SingleDataset name: SingleDataset
dataroot: data/animedataset/test/test_photo dataroot: data/animedataset/test/test_photo
max_dataset_size: inf preprocess:
direction: BtoA - name: LoadImageFromFile
input_nc: 3 key: A
output_nc: 3 - name: Transforms
serial_batches: False input_keys: [A]
pool_size: 50 pipeline:
transforms: - name: ResizeToScale
- name: Resize
size: [256, 256] size: [256, 256]
interpolation: "bicubic" #cv2.INTER_CUBIC scale: 32
interpolation: bilinear
- name: Transpose - name: Transpose
- name: Normalize - name: Normalize
mean: [127.5, 127.5, 127.5] mean: [127.5, 127.5, 127.5]
std: [127.5, 127.5, 127.5] std: [127.5, 127.5, 127.5]
keys: [image, image]
lr_scheduler: lr_scheduler:
name: LinearDecay name: LinearDecay
......
...@@ -78,7 +78,7 @@ dataset: ...@@ -78,7 +78,7 @@ dataset:
key: A key: A
- name: LoadImageFromFile - name: LoadImageFromFile
key: B key: B
- name: Transfroms - name: Transforms
input_keys: [A, B] input_keys: [A, B]
pipeline: pipeline:
- name: Resize - name: Resize
......
...@@ -70,7 +70,7 @@ animedataset ...@@ -70,7 +70,7 @@ animedataset
2. After the warmup, we strat to training GAN.: 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. **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 ```sh
python tools/main.py --config-file configs/animeganv2.yaml python tools/main.py --config-file configs/animeganv2.yaml
``` ```
......
...@@ -70,7 +70,7 @@ animedataset ...@@ -70,7 +70,7 @@ animedataset
1. 预热模型完成后,训练风格迁移模型: 1. 预热模型完成后,训练风格迁移模型:
**注意:** 必须先修改在`configs/animeganv2.yaml`中的`pretrain_ckpt`参数,确保指向正确的 **预热模型权重路径** **注意:** 必须先修改在`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 ```sh
python tools/main.py --config-file configs/animeganv2.yaml python tools/main.py --config-file configs/animeganv2.yaml
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册