python 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
jittor-CGAN
by qqjl21
本项目是第三届计图人工智能挑战赛热身赛项目,使用计图框架实现了基本的CGAN框架,基于MNIST数据集进行训练并生成数字图像。
环境配置
本项目实现时使用的python版本为Python 3.7.16,运行以下命令以配置环境
计图框架更多配置选项的安装,请参照https://cg.cs.tsinghua.edu.cn/jittor/download/
运行方式
可选的参数如下
或直接以默认参数运行
开源许可
使用Apache 2.0 License协议