Baike.dev
All toolsTrendingOpen sourceNewsSubmit
Log in
< 返回工具列表
P

PyTorch-GAN

> 编程语言
开源

PyTorch implementations of Generative Adversarial Networks.

17.5K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

PyTorch implementations of Generative Adversarial Networks.

**This repository has gone stale as I unfortunately do not have the time to maintain it anymore. If you would like to continue the development of it as a collaborator send me an email at [email protected].** ## PyTorch-GAN Collection of PyTorch implementations of Generative Adversarial Network varieties presented in research papers. Model architectures will not always mirror the ones proposed in the papers, but I have chosen to focus on getting the core ideas covered instead of getting every layer configuration right. Contributions and suggestions of GANs to implement are very welcomed. See also: [Keras-GAN](https://github.com/eriklindernoren/Keras-GAN) ## Table of Contents * [Installation](#installation) * [Implementations](#implementations) + [Auxiliary Classifier GAN](#auxiliary-classifier-gan) + [Adversarial Autoencoder](#adversarial-autoencoder) + [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) + [Coupled GAN](#coupled-gan) + [CycleGAN](#cyclegan) + [Deep Convolutional GAN](#deep-convolutional-gan) + [DiscoGAN](#discogan) + [DRAGAN](#dragan) + [DualGAN](#dualgan) + [Energy-Based GAN](#energy-based-gan) + [Enhanced Super-Resolution GAN](#enhanced-super-resolution-gan) + [GAN](#gan) + [InfoGAN](#infogan) + [Least Squares GAN](#least-squares-gan) + [MUNIT](#munit) + [Pix2Pix](#pix2pix) + [PixelDA](#pixelda) + [Relativistic GAN](#relativistic-gan) + [Semi-Supervised GAN](#semi-supervised-gan) + [Softmax GAN](#softmax-gan) + [StarGAN](#stargan) + [Super-Resolution GAN](#super-resolution-gan) + [UNIT](#unit) + [Wasserstein GAN](#wasserstein-gan) + [Wasserstein GAN GP](#wasserstein-gan-gp) + [Wasserstein GAN DIV](#wasserstein-gan-div) ## Installation $ git clone https://github.com/eriklindernoren/PyTorch-GAN $ cd PyTorch-GAN/ $ sudo pip3 install -r requirements.txt ## Implementations ### Auxiliary Classifier GAN _Auxiliary Classifier Generative Adversarial Network_ #### Authors Augustus Odena, Christopher Olah, Jonathon Shlens #### Abstract Synthesizing high resolution photorealistic images has been a long-standing challenge in machine learning. In this paper we introduce new methods for the improved training of generative adversarial networks (GANs) for image synthesis. We construct a variant of GANs employing label conditioning that results in 128x128 resolution image samples exhibiting global coherence. We expand on previous work for image quality assessment to provide two new analyses for assessing the discriminability and diversity of samples from class-conditional image synthesis models. These analyses demonstrate that high resolution samples provide class information not present in low resolution samples. Across 1000 ImageNet classes, 128x128 samples are more than twice as discriminable as artificially resized 32x32 samples. In addition, 84.7% of the classes have samples exhibiting diversity comparable to real ImageNet data. [[Paper]](https://arxiv.org/abs/1610.09585) [[Code]](implementations/acgan/acgan.py) #### Run Example ``` $ cd implementations/acgan/ $ python3 acgan.py ```

### Adversarial Autoencoder _Adversarial Autoencoder_ #### Authors Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, Brendan Frey #### Abstract n this paper, we propose the "adversarial autoencoder" (AAE), which is a probabilistic autoencoder that uses the recently proposed generative adversarial networks (GAN) to perform variational inference by matching the aggregated posterior of the hidden code vector of the autoencoder with an arbitrary prior distribution. Matching the aggregated posterior to the prior ensures that generating from any part of prior space results in meaningful samples. As a result, the decoder of the adversarial autoencoder learns a deep generative model that maps the imposed prior to the data distribution. We show how the adversarial autoencoder can be used in applications such as semi-supervised classification, disentangling style and content of images, unsupervised clustering, dimensionality reduction and data visualization. We performed experiments on MNIST, Street View House Numbers and Toronto Face datasets and show that adversarial autoencoders achieve competitive results in generative modeling and semi-supervised classification tasks. [[Paper]](https://arxiv.org/abs/1511.05644) [[Code]](implementations/aae/aae.py) #### Run Example ``` $ cd implementations/aae/ $ python3 aae.py ``` ### BEGAN _BEGAN: Boundary Equilibrium Generative Adversarial Networks_ #### Authors David Berthelot, Thomas Schumm, Luke Metz #### Abstract We propose a new equilibrium enforcing method paired with a loss derived from the Wasserstein distance for training auto-encoder based Generative Adversarial Networks. This method balances the generator and discriminator during training. Additionally, it provides a new approximate convergence measure, fast and stable training and high visual quality. We also derive a way of controlling the trade-off between image diversity and visual quality. We focus on the image generation task, setting a new milestone in visual quality, even at higher resolutions. This is achieved while using a relatively simple model architecture and a standard training procedure. [[Paper]](https://arxiv.org/abs/1703.10717) [[Code]](implementations/began/began.py) #### Run Example ``` $ cd implementations/began/ $ python3 began.py ``` ### BicycleGAN _Toward Multimodal Image-to-Image Translation_ #### Authors Jun-Yan Zhu, Richard Zhang, Deepak Pathak, Trevor Darrell, Alexei A. Efros, Oliver Wang, Eli Shechtman #### Abstract Many image-to-image translation problems are ambiguous, as a single input image may correspond to multiple possible outputs. In this work, we aim to model a \emph{distribution} of possible outputs in a conditional generative modeling setting. The ambiguity of the mapping is distilled in a low-dimensional latent vector, which can be randomly sampled at test time. A generator learns to map the given input, combined with this latent code, to the output. We explicitly encourage the connection between output and the latent code to be invertible. This helps prevent a many-to-one mapping from the latent code to the output during training, also known as the problem of mode collapse, and produces more diverse results. We explore several variants of this approach by employing different training objectives, network architectures, and methods of injecting the latent code. Our proposed method encourages bijective consistency between the latent encoding and output modes. We present a systematic comparison of our method and other variants on both perceptual realism and diversity. [[Paper]](https://arxiv.org/abs/1711.11586) [[Code]](implementations/bicyclegan/bicyclegan.py)

#### Run Example ``` $ cd data/ $ bash download_pix2pix_dataset.sh edges2shoes $ cd ../implementations/bicyclegan/ $ python3 bicyclegan.py ```

Various style translations by varying the latent code.

### Boundary-Seeking GAN _Boundary-Seeking Generative Adversarial Networks_ #### Authors R Devon Hjelm, Athul Paul Jacob, Tong Che, Adam Trischler, Kyunghyun Cho, Yoshua Bengio #### Abstract Generative adversarial networks (GANs) are a learning framework that rely on training a discriminator to estimate a measure of difference between a target and generated distributions. GANs, as normally formulated, rely on the generated samples being completely differentiable w.r.t. the generative parameters, and thus do not work for discrete data. We introduce a method for training GANs with discrete data that uses the estimated difference measure from the discriminator to compute importance weights for generated samples, thus providing a policy gradient for training the generator. The importance weights have a strong connection to the decision boundary of the discriminator, and we call our method boundary-seeking GANs (BGANs). We demonstrate the effectiveness of the proposed algorithm with discrete image and character-based natural language generation. In addition, the boundary-seeking objective extends to continuous data, which can be used to improve stability of training, and we demonstrate this on Celeba, Large-scale Scene Understanding (LSUN) bedrooms, and Imagenet without conditioning. [[Paper]](https://arxiv.org/abs/1702.08431) [[Code]](implementations/bgan/bgan.py) #### Run Example ``` $ cd implementations/bgan/ $ python3 bgan.py ``` ### Cluster 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 ```

### Conditional GAN _Conditional Generative Adversarial Nets_ #### Authors Mehdi Mirza, Simon Osindero #### Abstract Generative Adversarial Nets [8] were recently introduced as a novel way to train generative models. In this work we introduce the conditional version of generative adversarial nets, which can be constructed by simply feeding the data, y, we wish to condition on to both the generator and discriminator. We show that this model can generate MNIST digits conditioned on class labels. We also illustrate how this model could be used to learn a multi-modal model, and provide preliminary examples of an application to image tagging in which we demonstrate how this approach can generate descriptive tags which are not part of training labels. [[Paper]](https://arxiv.org/abs/1411.1784) [[Code]](implementations/cgan/cgan.py) #### Run Example ``` $ cd implementations/cgan/ $ python3 cgan.py ```

### Context-Conditional GAN _Semi-Supervised Learning with Context-Conditional Generative Adversarial Networks_ #### Authors Emily Denton, Sam Gross, Rob Fergus #### Abstract We introduce a simple semi-supervised learning approach for images based on in-painting using an adversarial loss. Images with random patches removed are presented to a generator whose task is to fill in the hole, based on the surrounding pixels. The in-painted images are then presented to a discriminator network that judges if they are real (unaltered training images) or not. This task acts as a regularizer for standard supervised training of the discriminator.

核心特点

  • •Installation
  • •Implementations
  • •Auxiliary Classifier GAN
  • •Adversarial Autoencoder
  • •BicycleGAN
  • •Boundary-Seeking GAN
  • •Cluster GAN
  • •Conditional GAN
  • •Context-Conditional GAN
  • •Context Encoder

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月9日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言
Baike.dev

baike.dev helps you discover great languages, frameworks, databases, DevOps and cloud-native tools.

Quick links

  • Home
  • All tools
  • Trending
  • Open source

About

  • About us
  • Community
  • News

Contribute

Found a great developer tool? Share it with the community.

Submit a tool
© 2026 baike.dev Developer EncyclopediaUpdated daily · Discover great developer tools