Skip to content

Commit fca9555

Browse files
authored
Update README.md
1 parent f8c5c05 commit fca9555

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,19 @@ CUDA_VISIBLE_DEVICES=0 python3 src/main.py -t -e -c CONFIG_PATH
100100
```
101101

102102
* Train (``-t``) and evaluate (``-e``) the model defined in ``CONFIG_PATH`` using GPUs ``(0, 1, 2, 3)`` and ``DataParallel``
103-
```console
103+
```bash
104104
CUDA_VISIBLE_DEVICES=0,1,2,3 python3 src/main.py -t -e -c CONFIG_PATH
105105
```
106106

107107
* Train (``-t``) and evaluate (``-e``) the model defined in ``CONFIG_PATH`` using GPUs ``(0, 1, 2, 3)`` and ``DistributedDataParallel``
108-
```console
108+
```bash
109109
CUDA_VISIBLE_DEVICES=0,1,2,3 python3 src/main.py -t -e -DDP -n 1 -nr 0 -c CONFIG_PATH
110110
```
111111
Try ``python3 src/main.py`` to see available options.
112112

113113

114114
Via Tensorboard, you can monitor trends of ``IS, FID, F_beta, Authenticity Accuracies, and the largest singular values``:
115-
```console
115+
```bash
116116
~ PyTorch-StudioGAN/logs/RUN_NAME>>> tensorboard --logdir=./ --port PORT
117117
```
118118
<p align="center">
@@ -160,23 +160,23 @@ Via Tensorboard, you can monitor trends of ``IS, FID, F_beta, Authenticity Accur
160160
CUDA_VISIBLE_DEVICES=0,1,...,N python3 src/main.py -t -DDP -n TOTAL_NODES -nr CURRENT_NODE -c CONFIG_PATH
161161
```
162162
* Mixed Precision Training ([Narang et al.](https://arxiv.org/abs/1710.03740))
163-
```console
163+
```bash
164164
CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -t -mpc -c CONFIG_PATH
165165
```
166166
* Standing Statistics ([Brock et al.](https://arxiv.org/abs/1809.11096))
167-
```console
167+
```bash
168168
CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -e -std_stat --standing_step STANDING_STEP -c CONFIG_PATH
169169
```
170170
* Synchronized BatchNorm
171-
```console
171+
```bash
172172
CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -t -sync_bn -c CONFIG_PATH
173173
```
174174
* Load All Data in Main Memory
175-
```console
175+
```bash
176176
CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -t -l -c CONFIG_PATH
177177
```
178178
* LARS
179-
```console
179+
```bash
180180
CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -t -l -c CONFIG_PATH -LARS
181181
```
182182

@@ -185,7 +185,7 @@ Via Tensorboard, you can monitor trends of ``IS, FID, F_beta, Authenticity Accur
185185
The StudioGAN supports ``Image visualization, K-nearest neighbor analysis, Linear interpolation, and Frequency analysis``. All results will be saved in ``./figures/RUN_NAME/*.png``.
186186

187187
* Image Visualization
188-
```console
188+
```bash
189189
CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -iv -std_stat --standing_step STANDING_STEP -c CONFIG_PATH --checkpoint_folder CHECKPOINT_FOLDER --log_output_path LOG_OUTPUT_PATH
190190
```
191191
<p align="center">
@@ -194,7 +194,7 @@ CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -iv -std_stat --standing_step S
194194

195195

196196
* K-Nearest Neighbor Analysis (we have fixed K=7, the images in the first column are generated images.)
197-
```console
197+
```bash
198198
CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -knn -std_stat --standing_step STANDING_STEP -c CONFIG_PATH --checkpoint_folder CHECKPOINT_FOLDER --log_output_path LOG_OUTPUT_PATH
199199
```
200200
<p align="center">
@@ -203,7 +203,7 @@ CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -knn -std_stat --standing_step
203203

204204

205205
* Linear Interpolation (applicable only to conditional Big ResNet models)
206-
```console
206+
```bash
207207
CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -itp -std_stat --standing_step STANDING_STEP -c CONFIG_PATH --checkpoint_folder CHECKPOINT_FOLDER --log_output_path LOG_OUTPUT_PATH
208208
```
209209
<p align="center">
@@ -212,7 +212,7 @@ CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -itp -std_stat --standing_step
212212

213213

214214
* Frequency Analysis
215-
```console
215+
```bash
216216
CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -fa -std_stat --standing_step STANDING_STEP -c CONFIG_PATH --checkpoint_folder CHECKPOINT_FOLDER --log_output_path LOG_OUTPUT_PATH
217217
```
218218
<p align="center">
@@ -225,13 +225,13 @@ CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -fa -std_stat --standing_step S
225225
Inception Score (IS) is a metric to measure how much GAN generates high-fidelity and diverse images. Calculating IS requires the pre-trained Inception-V3 network, and recent approaches utilize [OpenAI's TensorFlow implementation](https://github.com/openai/improved-gan).
226226

227227
To compute official IS, you have to make a "samples.npz" file using the command below:
228-
```console
228+
```bash
229229
CUDA_VISIBLE_DEVICES=0,1,... python3 src/main.py -s -c CONFIG_PATH --checkpoint_folder CHECKPOINT_FOLDER --log_output_path LOG_OUTPUT_PATH
230230
```
231231

232232
It will automatically create the samples.npz file in the path ``./samples/RUN_NAME/fake/npz/samples.npz``.
233233
After that, execute TensorFlow official IS implementation. Note that we do not split a dataset into ten folds to calculate IS ten times. We use the entire dataset to compute IS only once, which is the evaluation strategy used in the [CompareGAN](https://github.com/google/compare_gan) repository.
234-
```console
234+
```bash
235235
CUDA_VISIBLE_DEVICES=0,1,... python3 src/inception_tf13.py --run_name RUN_NAME --type "fake"
236236
```
237237
Keep in mind that you need to have TensorFlow 1.3 or earlier version installed!

0 commit comments

Comments
 (0)