Giter Site home page Giter Site logo

testzh's Introduction

| 第二届计图热身赛

Jittor 计图挑战热身赛

| 计图挑战热身赛要求:

本赛题将会提供数字图片数据集 MNIST,参赛选手需要训练一个将随机噪声和类别标签映射为数字图片的Conditional GAN模型,并生成注册时绑定的手机号。

|最终结果(马赛克处理后)

生成结果

安装

| 基本的硬件需求、运行环境、依赖安装方法

本项目在个人笔记本电脑(GPU:NVIDIA 960M)上完成,训练时间约为 0.5 小时。

运行环境

  • Win 10
  • python >= 3.8
  • jittor

安装依赖

执行以下命令安装 python 依赖

conda create -n xxx(your env name) python=3.8
conda activate xxx
conda install pywin32
python -m pip install jittor
pip install -r requirements.txt

训练

| 介绍模型训练的方法

缺失代码添加:

# TODO: 添加最后一个线性层,最终输出为一个实数
nn.Linear(512,opt.n_classes)
# TODO: 将d_in输入到模型中并返回计算结果
output = self.model(d_in)
# TODO: 计算真实类别的损失函数
d_real_loss = adversarial_loss(validity_real,valid)
# TODO: 计算虚假类别的损失函数
d_fake_loss = adversarial_loss(validity_fake,fake)
# 生成你的手机号
number = '17xxxxxxxxx'

训练可运行以下命令:

python CGAN.py

致谢

感谢Jittor

testzh's People

Contributors

zhonghhx avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.