目录
目录readme.md

CGAN_jittor

This is a Jittor implementation of Conditional GAN (CGAN).

The model consists of a generator and a disciminator. The generator takes a random vector and a numeric label as input, and outputs the corresponding numeric image; the discriminator inputs an image and outputs the probabilities of different numeric classifications. The generator and the discriminator are jointly trained to reduce the overall model’s loss. The dataset is loaded from MNIST.

Requirements

  • Python 3.7 or higher
  • Numpy
  • Jittor

Usage

  1. Clone this repository and navigate to the cloned project:

    https://www.gitlink.org.cn/lengyanze/CGAN_jittor
    cd CGAN_jittor
  2. Run CGAN.py:

    python CGAN.py

More running options below:

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]

options:
  -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
关于

A Jittor implementation of Conditional GAN (CGAN).

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

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