Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dorarad authored Feb 3, 2022
1 parent 852076c commit 707bb32
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pytorch_version/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
## See the [repository readme](../README.md) for full usage instructions!
# See the [repository readme](../README.md) for full usage instructions!

### Pytorch implementation
## Pytorch implementation
Our repository now supports both **Tensorflow** (at [the main directory](../)) and **Pytorch** (at this directory).
The two implementations follow a close code and files structure, and share the same interface.
To switch from the TF to Pytorch, simply enter into `pytorch_version`, and install the [requirements](requirements.txt).

### Pretrained models
The Pytorch implementation is compatible with models trained through the TF implementation.
To convert a TF model to Pytorch, run the following:
```python
python loader.py --source=checkpoint-tf.pkl --dest=checkpoint.pkl
```

### Command-line Options
Compared to the TF version, we removed several options that didn't contribute empirically to performance:
```
--tanh: to add tanh on the generator output
--d-reg: discriminator regularization type [non, gp, r1, r2], (In pytorch we use only r1 -- the default TF regularization)
--d-reg: discriminator regularization type: non, gp, r1, r2, (In pytorch we use only r1 -- the default TF regularization)
```

### Command-line Options
The Pytorch version supports the GANformer model, as well as Vanilla and StyleGAN2 baselines.
The TF version additionally supports k-GAN and SAGAN baselines.

Expand Down

0 comments on commit 707bb32

Please sign in to comment.