A Jittor implementation of Conditional GAN (CGAN).
The MNIST dataset is automatically downloaded. Then we start to train the model. In each iteration, the images and class label pairs in the dataset are enumerated, a set of input vectors is randomly generated to calculate the generator and discriminator loss functions, gradients are returned, and the network parameters are updated. After the model is trained, given a set of specified digital sequences as input digital labels, an image would be generated by the model, saved to result.png.
cgan_jittor
A Jittor implementation of Conditional GAN (CGAN). The MNIST dataset is automatically downloaded. Then we start to train the model. In each iteration, the images and class label pairs in the dataset are enumerated, a set of input vectors is randomly generated to calculate the generator and discriminator loss functions, gradients are returned, and the network parameters are updated. After the model is trained, given a set of specified digital sequences as input digital labels, an image would be generated by the model, saved to
result.png
.Running Command:
python CGAN.py