Skip to content

Commit a163b82

Browse files
Merge pull request eriklindernoren#58 from zhampel/add_clustergan
Add simple ClusterGAN script to implementations
2 parents fd9f071 + 3001a2f commit a163b82

File tree

3 files changed

+600
-0
lines changed

3 files changed

+600
-0
lines changed

README.md

+34
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Collection of PyTorch implementations of Generative Adversarial Network varietie
1313
+ [BEGAN](#began)
1414
+ [BicycleGAN](#bicyclegan)
1515
+ [Boundary-Seeking GAN](#boundary-seeking-gan)
16+
+ [Cluster GAN](#cluster-gan)
1617
+ [Conditional GAN](#conditional-gan)
1718
+ [Context-Conditional GAN](#context-conditional-gan)
1819
+ [Context Encoder](#context-encoder)
@@ -149,6 +150,39 @@ $ cd implementations/bgan/
149150
$ python3 bgan.py
150151
```
151152

153+
### Cluster GAN
154+
_ClusterGAN: Latent Space Clustering in Generative Adversarial Networks_
155+
156+
#### Authors
157+
Sudipto Mukherjee, Himanshu Asnani, Eugene Lin, Sreeram Kannan
158+
159+
#### Abstract
160+
Generative Adversarial networks (GANs) have obtained remarkable success in many unsupervised learning tasks and
161+
unarguably, clustering is an important unsupervised learning problem. While one can potentially exploit the
162+
latent-space back-projection in GANs to cluster, we demonstrate that the cluster structure is not retained in the
163+
GAN latent space. In this paper, we propose ClusterGAN as a new mechanism for clustering using GANs. By sampling
164+
latent variables from a mixture of one-hot encoded variables and continuous latent variables, coupled with an
165+
inverse network (which projects the data to the latent space) trained jointly with a clustering specific loss, we
166+
are able to achieve clustering in the latent space. Our results show a remarkable phenomenon that GANs can preserve
167+
latent space interpolation across categories, even though the discriminator is never exposed to such vectors. We
168+
compare our results with various clustering baselines and demonstrate superior performance on both synthetic and
169+
real datasets.
170+
171+
[[Paper]](https://arxiv.org/abs/1809.03627) [[Code]](implementations/cluster_gan/clustergan.py)
172+
173+
Code based on a full PyTorch [[implementation]](https://github.com/zhampel/clusterGAN).
174+
175+
#### Run Example
176+
```
177+
$ cd implementations/cluster_gan/
178+
$ python3 clustergan.py
179+
```
180+
181+
<p align="center">
182+
<img src="assets/cluster_gan.gif" width="360"\>
183+
</p>
184+
185+
152186
### Conditional GAN
153187
_Conditional Generative Adversarial Nets_
154188

assets/cluster_gan.gif

7.55 MB
Loading

0 commit comments

Comments
 (0)