This project is a Conditional GAN (CGAN) implemented using the Jittor framework. Based on the MNIST dataset, it trains a model to map noise and class labels to digit images for generating specified sequences.
II. Technical Framework
Built with Jittor, a deep learning framework supporting Linux and Windows (including WSL). It also relies on Python and C++ compilers (g++ or clang).
III. Project Structure
The pub folder contains CGAN.py for model definition, training, and inference. It also holds intermediate training results, model parameters, and final images.
CGAN.py builds a CGAN network to train model and generates certain id photo.
result.png is an example of model’s output.
IV. Running the Project
Install Jittor via Docker, pip, or manual installation. Details: Jittor Installation.
Run CGAN.py. It auto-downloads MNIST and trains the model with the set optimizer and loss function. Each iteration processes image-label pairs, generates input vectors, computes losses, and updates parameters. After several iterations, it generates sample images.
After training, specify a digit sequence to generate and save an image as result.png.
关于
A jitter implementation of conditional gan for MNIST recognition
gitter-cgan-sxy
I. Project Overview
This project is a Conditional GAN (CGAN) implemented using the Jittor framework. Based on the MNIST dataset, it trains a model to map noise and class labels to digit images for generating specified sequences.
II. Technical Framework
Built with Jittor, a deep learning framework supporting Linux and Windows (including WSL). It also relies on Python and C++ compilers (g++ or clang).
III. Project Structure
The pub folder contains CGAN.py for model definition, training, and inference. It also holds intermediate training results, model parameters, and final images.
CGAN.py
builds a CGAN network to train model and generates certain id photo.result.png
is an example of model’s output.IV. Running the Project
Install Jittor via Docker, pip, or manual installation. Details: Jittor Installation.
Run CGAN.py. It auto-downloads MNIST and trains the model with the set optimizer and loss function. Each iteration processes image-label pairs, generates input vectors, computes losses, and updates parameters. After several iterations, it generates sample images.
After training, specify a digit sequence to generate and save an image as result.png.