|
1 | | -Usage: train.py [OPTIONS] |
2 | | -
|
3 | | - Train a GAN using the techniques described in the paper "Training |
4 | | - Generative Adversarial Networks with Limited Data". |
5 | | -
|
6 | | - Examples: |
7 | | -
|
8 | | - # Train with custom images using 1 GPU. |
9 | | - python train.py --outdir=~/training-runs --data=~/my-image-folder |
10 | | -
|
11 | | - # Train class-conditional CIFAR-10 using 2 GPUs. |
12 | | - python train.py --outdir=~/training-runs --data=~/datasets/cifar10.zip \ |
13 | | - --gpus=2 --cfg=cifar --cond=1 |
14 | | -
|
15 | | - # Transfer learn MetFaces from FFHQ using 4 GPUs. |
16 | | - python train.py --outdir=~/training-runs --data=~/datasets/metfaces.zip \ |
17 | | - --gpus=4 --cfg=paper1024 --mirror=1 --resume=ffhq1024 --snap=10 |
18 | | -
|
19 | | - # Reproduce original StyleGAN2 config F. |
20 | | - python train.py --outdir=~/training-runs --data=~/datasets/ffhq.zip \ |
21 | | - --gpus=8 --cfg=stylegan2 --mirror=1 --aug=noaug |
22 | | -
|
23 | | - Base configs (--cfg): |
24 | | - auto Automatically select reasonable defaults based on resolution |
25 | | - and GPU count. Good starting point for new datasets. |
26 | | - stylegan2 Reproduce results for StyleGAN2 config F at 1024x1024. |
27 | | - paper256 Reproduce results for FFHQ and LSUN Cat at 256x256. |
28 | | - paper512 Reproduce results for BreCaHAD and AFHQ at 512x512. |
29 | | - paper1024 Reproduce results for MetFaces at 1024x1024. |
30 | | - cifar Reproduce results for CIFAR-10 at 32x32. |
31 | | -
|
32 | | - Transfer learning source networks (--resume): |
33 | | - ffhq256 FFHQ trained at 256x256 resolution. |
34 | | - ffhq512 FFHQ trained at 512x512 resolution. |
35 | | - ffhq1024 FFHQ trained at 1024x1024 resolution. |
36 | | - celebahq256 CelebA-HQ trained at 256x256 resolution. |
37 | | - lsundog256 LSUN Dog trained at 256x256 resolution. |
38 | | - <PATH or URL> Custom network pickle. |
39 | | -
|
40 | | -Options: |
41 | | - --outdir DIR Where to save the results [required] |
42 | | - --gpus INT Number of GPUs to use [default: 1] |
43 | | - --snap INT Snapshot interval [default: 50 ticks] |
44 | | - --metrics LIST Comma-separated list or "none" [default: |
45 | | - fid50k_full] |
46 | | - --seed INT Random seed [default: 0] |
47 | | - -n, --dry-run Print training options and exit |
48 | | - --data PATH Training data (directory or zip) [required] |
49 | | - --cond BOOL Train conditional model based on dataset |
50 | | - labels [default: false] |
51 | | - --subset INT Train with only N images [default: all] |
52 | | - --mirror BOOL Enable dataset x-flips [default: false] |
53 | | - --cfg [auto|stylegan2|paper256|paper512|paper1024|cifar] |
54 | | - Base config [default: auto] |
55 | | - --gamma FLOAT Override R1 gamma |
56 | | - --kimg INT Override training duration |
57 | | - --batch INT Override batch size |
58 | | - --aug [noaug|ada|fixed] Augmentation mode [default: ada] |
59 | | - --p FLOAT Augmentation probability for --aug=fixed |
60 | | - --target FLOAT ADA target value for --aug=ada |
61 | | - --augpipe [blit|geom|color|filter|noise|cutout|bg|bgc|bgcf|bgcfn|bgcfnc] |
62 | | - Augmentation pipeline [default: bgc] |
63 | | - --resume PKL Resume training [default: noresume] |
64 | | - --freezed INT Freeze-D [default: 0 layers] |
65 | | - --fp32 BOOL Disable mixed-precision training |
66 | | - --nhwc BOOL Use NHWC memory format with FP16 |
67 | | - --nobench BOOL Disable cuDNN benchmarking |
68 | | - --workers INT Override number of DataLoader workers |
69 | | - --help Show this message and exit. |
| 1 | +Usage: train.py [OPTIONS] |
| 2 | + |
| 3 | + Train a GAN using the techniques described in the paper "Training |
| 4 | + Generative Adversarial Networks with Limited Data". |
| 5 | + |
| 6 | + Examples: |
| 7 | + |
| 8 | + # Train with custom images using 1 GPU. |
| 9 | + python train.py --outdir=~/training-runs --data=~/my-image-folder |
| 10 | + |
| 11 | + # Train class-conditional CIFAR-10 using 2 GPUs. |
| 12 | + python train.py --outdir=~/training-runs --data=~/datasets/cifar10.zip \ |
| 13 | + --gpus=2 --cfg=cifar --cond=1 |
| 14 | + |
| 15 | + # Transfer learn MetFaces from FFHQ using 4 GPUs. |
| 16 | + python train.py --outdir=~/training-runs --data=~/datasets/metfaces.zip \ |
| 17 | + --gpus=4 --cfg=paper1024 --mirror=1 --resume=ffhq1024 --snap=10 |
| 18 | + |
| 19 | + # Reproduce original StyleGAN2 config F. |
| 20 | + python train.py --outdir=~/training-runs --data=~/datasets/ffhq.zip \ |
| 21 | + --gpus=8 --cfg=stylegan2 --mirror=1 --aug=noaug |
| 22 | + |
| 23 | + Base configs (--cfg): |
| 24 | + auto Automatically select reasonable defaults based on resolution |
| 25 | + and GPU count. Good starting point for new datasets. |
| 26 | + stylegan2 Reproduce results for StyleGAN2 config F at 1024x1024. |
| 27 | + paper256 Reproduce results for FFHQ and LSUN Cat at 256x256. |
| 28 | + paper512 Reproduce results for BreCaHAD and AFHQ at 512x512. |
| 29 | + paper1024 Reproduce results for MetFaces at 1024x1024. |
| 30 | + cifar Reproduce results for CIFAR-10 at 32x32. |
| 31 | + |
| 32 | + Transfer learning source networks (--resume): |
| 33 | + ffhq256 FFHQ trained at 256x256 resolution. |
| 34 | + ffhq512 FFHQ trained at 512x512 resolution. |
| 35 | + ffhq1024 FFHQ trained at 1024x1024 resolution. |
| 36 | + celebahq256 CelebA-HQ trained at 256x256 resolution. |
| 37 | + lsundog256 LSUN Dog trained at 256x256 resolution. |
| 38 | + <PATH or URL> Custom network pickle. |
| 39 | + |
| 40 | +Options: |
| 41 | + --outdir DIR Where to save the results [required] |
| 42 | + --gpus INT Number of GPUs to use [default: 1] |
| 43 | + --snap INT Snapshot interval [default: 50 ticks] |
| 44 | + --metrics LIST Comma-separated list or "none" [default: |
| 45 | + fid50k_full] |
| 46 | + --seed INT Random seed [default: 0] |
| 47 | + -n, --dry-run Print training options and exit |
| 48 | + --data PATH Training data (directory or zip) [required] |
| 49 | + --cond BOOL Train conditional model based on dataset |
| 50 | + labels [default: false] |
| 51 | + --subset INT Train with only N images [default: all] |
| 52 | + --mirror BOOL Enable dataset x-flips [default: false] |
| 53 | + --cfg [auto|stylegan2|paper256|paper512|paper1024|cifar] |
| 54 | + Base config [default: auto] |
| 55 | + --gamma FLOAT Override R1 gamma |
| 56 | + --kimg INT Override training duration |
| 57 | + --batch INT Override batch size |
| 58 | + --aug [noaug|ada|fixed] Augmentation mode [default: ada] |
| 59 | + --p FLOAT Augmentation probability for --aug=fixed |
| 60 | + --target FLOAT ADA target value for --aug=ada |
| 61 | + --augpipe [blit|geom|color|filter|noise|cutout|bg|bgc|bgcf|bgcfn|bgcfnc] |
| 62 | + Augmentation pipeline [default: bgc] |
| 63 | + --resume PKL Resume training [default: noresume] |
| 64 | + --freezed INT Freeze-D [default: 0 layers] |
| 65 | + --fp32 BOOL Disable mixed-precision training |
| 66 | + --nhwc BOOL Use NHWC memory format with FP16 |
| 67 | + --nobench BOOL Disable cuDNN benchmarking |
| 68 | + --workers INT Override number of DataLoader workers |
| 69 | + --help Show this message and exit. |
0 commit comments