HomeMachine Learning & Neural NetworksCycleGAN: Cycle-Consistency Loss Live

CycleGAN: Cycle-Consistency Loss Live

Watch a toy CycleGAN train live in 3D: two generators and two discriminators learn an unpaired mapping between a sphere domain and a torus domain while a cycle-consistency loss keeps F(G(x)) close to x.

Machine Learning & Neural Networks3DAdvanced60 FPS📱 Mobile-adapted⇄ 2D version
ai-topic-41 ↗ Open standalone

This simulator trains a genuine, tiny CycleGAN in your browser — two generator networks (G: X→Y, F: Y→X) and two discriminator networks — with real backpropagation running every animation frame, mapping between a sphere-shaped point cloud and a torus-shaped point cloud that share no paired examples. A live cycle-consistency loss term (‖F(G(x))−x‖ + ‖G(F(y))−y‖) keeps the two generators acting as approximate inverses of each other; drop its weight to zero and watch the reconstructed clouds drift away from their originals, a direct demonstration of the failure mode cycle-consistency was invented to prevent in unpaired image-to-image translation models like CycleGAN and StyleGAN-based translators.

⚙ Under the hood

Train a real tiny CycleGAN live in 3D: two generator networks and two discriminators learn an unpaired mapping between a sphere and a torus point cloud while a cycle-consistency loss keeps F(G(x)) close to x.

gancyclegangenerative-modelsunsupervised-learningneural-networksbackpropagation

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)