Skip to content

Commit

Permalink
Adds single clustergan script
Browse files Browse the repository at this point in the history
  • Loading branch information
zhampel committed Jun 17, 2019
1 parent fd9f071 commit 5f84be0
Show file tree
Hide file tree
Showing 2 changed files with 600 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Collection of PyTorch implementations of Generative Adversarial Network varietie
+ [BEGAN](#began)
+ [BicycleGAN](#bicyclegan)
+ [Boundary-Seeking GAN](#boundary-seeking-gan)
+ [Cluster GAN](#cluster-gan)
+ [Conditional GAN](#conditional-gan)
+ [Context-Conditional GAN](#context-conditional-gan)
+ [Context Encoder](#context-encoder)
Expand Down Expand Up @@ -149,6 +150,39 @@ $ cd implementations/bgan/
$ python3 bgan.py
```

### Conditional GAN
_ClusterGAN: Latent Space Clustering in Generative Adversarial Networks_

#### Authors
Sudipto Mukherjee, Himanshu Asnani, Eugene Lin, Sreeram Kannan

#### Abstract
Generative Adversarial networks (GANs) have obtained remarkable success in many unsupervised learning tasks and
unarguably, clustering is an important unsupervised learning problem. While one can potentially exploit the
latent-space back-projection in GANs to cluster, we demonstrate that the cluster structure is not retained in the
GAN latent space. In this paper, we propose ClusterGAN as a new mechanism for clustering using GANs. By sampling
latent variables from a mixture of one-hot encoded variables and continuous latent variables, coupled with an
inverse network (which projects the data to the latent space) trained jointly with a clustering specific loss, we
are able to achieve clustering in the latent space. Our results show a remarkable phenomenon that GANs can preserve
latent space interpolation across categories, even though the discriminator is never exposed to such vectors. We
compare our results with various clustering baselines and demonstrate superior performance on both synthetic and
real datasets.

[[Paper]](https://arxiv.org/abs/1809.03627) [[Code]](implementations/cluster_gan/clustergan.py)

Code based on a full PyTorch [[implementation]](https://github.com/zhampel/clusterGAN).

#### Run Example
```
$ cd implementations/cluster_gan/
$ python3 clustergan.py
```

<p align="center">
<img src="assets/cluster_gan.gif" width="360"\>
</p>


### Conditional GAN
_Conditional Generative Adversarial Nets_

Expand Down
Loading

0 comments on commit 5f84be0

Please sign in to comment.