Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

readme.md

Conditional GAN in TensorFlow and PyTorch

This repository This repository contains code for Conditional GAN in TensorFlow and PyTorch blogpost.

Package Dependencies

download

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.

Directory Structure

├── PyTorch
│   ├── CGAN-PyTorch.ipynb
│   └── cgan_pytorch.py
└── TensorFlow
    ├── CGAN-FashionMnist-TensorFlow.ipynb
    ├── cgan_fashionmnist_tensorflow.py
    ├── CGAN-RockPaperScissor-TensorFlow.ipynb
    └── cgan_rockpaperscissor_tensorflow.py

Instructions

PyTorch

To train the Conditional GAN with PyTorch, go into the PyTorch folder and execute either the Python script or the notebook.

TensorFlow

To train the Conditional GAN with TensorFlow, go into the TensorFlow folder and execute the notebook or script.

AI Courses by OpenCV

Want to become an expert in AI? AI Courses by OpenCV is a great place to start.

img