Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs and update docs #187

Merged
merged 1 commit into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions configs/animeganv2_pretrain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion configs/ugatit_photo2cartoon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ dataset:
key: A
- name: LoadImageFromFile
key: B
- name: Transfroms
- name: Transforms
input_keys: [A, B]
pipeline:
- name: Resize
Expand Down
2 changes: 1 addition & 1 deletion docs/en_US/tutorials/animegan.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
2 changes: 1 addition & 1 deletion docs/zh_CN/tutorials/animegan.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down