This repository This repository contains code for Conditional GAN in TensorFlow and PyTorch blogpost.
This repository trains Conditional GANs in both PyTorch and TensorFlow on the Fashion-MNIST and Rock-Paper-Scissors datasets. The current requirements have been validated with Python 3.12.x.
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -r requirements.txt
The PyTorch script now falls back to CPU automatically when the installed CUDA build does not support the available GPU.
├── PyTorch
│ ├── CGAN-PyTorch.ipynb
│ └── cgan_pytorch.py
└── TensorFlow
├── CGAN-FashionMnist-TensorFlow.ipynb
├── cgan_fashionmnist_tensorflow.py
├── CGAN-RockPaperScissor-TensorFlow.ipynb
└── cgan_rockpaperscissor_tensorflow.py
To train the Conditional GAN with PyTorch, go into the PyTorch folder and execute either the Python script or the notebook.
To train the Conditional GAN with TensorFlow, go into the TensorFlow folder and execute the notebook or script.
LearnOpenCV is maintained by BigVision.AI, a computer vision and AI consulting company. We help organizations design, build, optimize, and deploy production-ready AI solutions. Our team has deep expertise in computer vision, deep learning, multimodal AI, and edge deployment, with experience solving complex technical challenges across industries.
Have a project in mind? Talk with our expert AI solution builders.
