# devnag/pytorch-generative-adversarial-networks

A very simple generative adversarial network (GAN) in PyTorch

Repository: https://github.com/devnag/pytorch-generative-adversarial-networks
Canonical: https://ross.abutalabs.com/products/pytorch-generative-adversarial-networks
Language: Python
License: Apache-2.0
License Family: permissive
Topics: pytorch, gan, gans, machine-learning, deep-learning
Last push: 2021-06-30T21:44:59+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3491, "days_push": 1890, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1540, forks 440 (observed 2026-08-28T04:05:00.541309+00:00)

## What it is
A minimal, educational implementation of a generative adversarial network (GAN) in PyTorch, in roughly 50 lines of code. It trains generator and discriminator networks to match a shifted/scaled Gaussian distribution, accompanying a Medium blog post.

## Use cases
- learn how GANs work with a minimal code example
- understand generator vs discriminator training in PyTorch
- follow along with a GAN tutorial blog post
- experiment with adversarial training on a simple distribution
- starting point for building custom GANs in PyTorch

## When to choose
- you want a tiny, readable GAN example to learn from
- you are teaching or studying adversarial network fundamentals
- you need a minimal PyTorch GAN skeleton to extend

## When to avoid
- you need production-ready GAN training with modern architectures
- you want image generation like DCGAN or StyleGAN
- you need maintained code with recent PyTorch compatibility guarantees

## Facets
- artifact type: learning-resource
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: machine-learning, deep-learning, artificial-intelligence
- platform: python
- tags: gan, pytorch, educational, minimal-example

## Member repositories
- devnag/pytorch-generative-adversarial-networks (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:00.541309+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:30:50.424004+00:00, confidence not recorded.
  - readme: https://github.com/devnag/pytorch-generative-adversarial-networks (fetched 2026-08-28T04:05:00.541309+00:00, sha 4817aba869e5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
