usage: CGAN.py [-h] [--n_epochs N_EPOCHS] [--batch_size BATCH_SIZE] [--lr LR] [--b1 B1] [--b2 B2] [--n_cpu N_CPU] [--latent_dim LATENT_DIM] [--n_classes N_CLASSES] [--img_size IMG_SIZE]
[--channels CHANNELS] [--sample_interval SAMPLE_INTERVAL]
optional arguments:
-h, --help show this help message and exit
--n_epochs N_EPOCHS number of epochs of training
--batch_size BATCH_SIZE
size of the batches
--lr LR adam: learning rate
--b1 B1 adam: decay of first order momentum of gradient
--b2 B2 adam: decay of first order momentum of gradient
--n_cpu N_CPU number of cpu threads to use during batch generation
--latent_dim LATENT_DIM
dimensionality of the latent space
--n_classes N_CLASSES
number of classes for dataset
--img_size IMG_SIZE size of each image dimension
--channels CHANNELS number of image channels
--sample_interval SAMPLE_INTERVAL
interval between image sampling
根据说明来指定程序的运行参数进行训练,在 CGAN.py 中修改
number = "13905131389343"
来输出不同的数字序列图片。
关于
A Jittor implementation of Conditional GAN (CGAN)。
使用计图实现的 CGAN 模型。
CGAN_jittor
项目说明
基于 MNIST 数据集,使用 Jittor 框架实现了简单的 CGAN 模型,可以将数字序列转换为手写的数字序列图片输出。
项目环境配置
项目中需要安装 Jittor 框架,请参考 https://cg.cs.tsinghua.edu.cn/jittor/download/,根据电脑实际配置进行安装。
项目运行使用
在项目文件夹下运行
python CGAN.py --help
获取项目运行的参数信息如下:根据说明来指定程序的运行参数进行训练,在
CGAN.py
中修改来输出不同的数字序列图片。