目录
目录README.md

jittor-CGAN

by qqjl21

本项目是第三届计图人工智能挑战赛热身赛项目,使用计图框架实现了基本的CGAN框架,基于MNIST数据集进行训练并生成数字图像。

环境配置

本项目实现时使用的python版本为Python 3.7.16,运行以下命令以配置环境

pip install -r requirement.txt

计图框架更多配置选项的安装,请参照https://cg.cs.tsinghua.edu.cn/jittor/download/

运行方式

可选的参数如下

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

或直接以默认参数运行

python CGAN.py

开源许可

使用Apache 2.0 License协议

关于

Jittor人工智能挑战赛热身赛文件 by qqjl21

10.0 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号