Home▸AI & Machine Learning▸2D GAN Training: Generator vs Discriminator

2D GAN Training: Generator vs Discriminator

2D Canvas view of a GAN training loop: watch generated latent points converge onto a real-data manifold curve as the generator learns to fool the discriminator, with mode collapse visible at low diversity.

AI & Machine Learning2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-generative-adversarial-networks-gan-simulator ↗ Open standalone

This 2D companion trades the rotating torus-knot scene of the 3D version for a flat manifold curve you can read at a glance: generated points (red-to-green by how close they are to their target) chase fixed targets on a cyan lemniscate that stands in for the real data distribution, while the learning-rate, latent-diversity and batch-size sliders drive the same convergence math as the 3D original — including visible mode collapse when diversity is dragged low.

⚙ Under the hood

2D Canvas GAN training loop: latent points converge onto a fixed manifold curve under a learning-rate-scaled step each frame, with generator loss and an estimated discriminator accuracy tracked live.

GANgenerative adversarial networkmode collapsediscriminatorlatent spacemachine learning

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)