A Jittor implementation of Conditional Generative Adversarial Network (CGAN) that generates images conditioned on class labels using the Jittor deep learning framework.
This project implements a Conditional Generative Adversarial Network (CGAN) using the Jittor deep learning framework. CGANs are an extension of GANs where the generator and discriminator are conditioned on additional information, such as class labels.
Intention
The contents of this project meet the requirements of Program Assignment 3 in the course “Fundamentals of computer graphics” 2024-spring.
Features
Implemented using Jittor
Conditional image generation based on class labels
Training with MNIST dataset
Save and load trained models
Generate and save images
Installation
Clone the repository:
Install the required packages:
pip install jittor
The code will download the MNIST dataset when running, you need not install it by yourself.
A Jittor Implementation of CGAN
A Jittor implementation of Conditional Generative Adversarial Network (CGAN) that generates images conditioned on class labels using the Jittor deep learning framework.
Table of Contents
Introduction
This project implements a Conditional Generative Adversarial Network (CGAN) using the Jittor deep learning framework. CGANs are an extension of GANs where the generator and discriminator are conditioned on additional information, such as class labels.
Intention
The contents of this project meet the requirements of Program Assignment 3 in the course “Fundamentals of computer graphics” 2024-spring.
Features
Installation
Clone the repository:
Install the required packages:
The code will download the MNIST dataset when running, you need not install it by yourself.
Usage
Run the training script:
Adjust the command-line arguments as needed:
--n_epochs
: Number of epochs of training (default: 100)--batch_size
: Size of the batches (default: 64)--lr
: Adam: learning rate (default: 0.0002)--b1
: Adam: decay of first order momentum of gradient (default: 0.5)--b2
: Adam: decay of second order momentum of gradient (default: 0.999)--n_cpu
: Number of cpu threads to use during batch generation (default: 8)--latent_dim
: Dimensionality of the latent space (default: 100)--n_classes
: Number of classes for dataset (default: 10)--img_size
: Size of each image dimension (default: 32)--channels
: Number of image channels (default: 1)--sample_interval
: Interval between image sampling (default: 1000)Train and store models when running
Generate images after training:
After training, the script will automatically generate an image showing the number variable determined in the code.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature-branch
)git commit -m 'Add some feature'
)git push origin feature-branch
)