← 开源
clvrai

SSGAN-Tensorflow

A Tensorflow implementation of Semi-supervised Learning Generative Adversarial Networks (NIPS 2016: Improved Techniques for Training GANs).

Model DevelopmentArchitecturePython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
515
Star
164
Fork
+0
本周
1
贡献者
创建于 2017-06-03 · 更新于 2026-09-28 · 今日第 17968 名
主要开发者

clvrai/SSGAN-Tensorflow 排名第 17,968,有 515 个星标。

同类别比较

clvrai/SSGAN-Tensorflow 排名第 17,968,此处有 8 个同类条目;circuitnet/CircuitNet 排名第 17,967。

同类别比较
名称排名指标
Leeroo-AI/mergoo17,963
语言:
Python
星标数:
515
分叉数:
34
简介:
A library for easily merging multiple LLM experts, and efficiently train the merged LLM.
NVlabs/pacnet17,964
语言:
Python
星标数:
515
分叉数:
79
简介:
Pixel-Adaptive Convolutional Neural Networks (CVPR '19)
apple-aiml-research/ml-mdm17,966
语言:
Python
星标数:
515
分叉数:
37
简介:
Train high-quality text-to-image diffusion models in a data & compute efficient manner
circuitnet/CircuitNet17,967
语言:
Python
星标数:
515
分叉数:
86
简介:
CircuitNet: An Open-Source Dataset for Machine Learning Applications in Electronic Design Automation (EDA)
Lizhen0628/text_classification17,985
语言:
Python
星标数:
514
分叉数:
73
简介:
使用rnn,lstm,gru,fasttext,textcnn,dpcnn,rnn-att,lstm-att,兼容huggleface/transformers,以及以transforemrs作为词嵌入模型,后面接入cnn、rnn、attention等等做文本分类。以及各个模型的对比
VCIP-RGBD/DFormer17,988
语言:
Python
星标数:
514
分叉数:
63
简介:
DFormers for Multimodal Semantic Segmentation
XiuzeZhou/RUL17,990
语言:
Jupyter Notebook
星标数:
514
分叉数:
83
简介:
Transformer Network for Remaining Useful Life Prediction of Lithium-Ion Batteries
alteryx/compose17,992
语言:
Python
星标数:
514
分叉数:
51
简介:
A machine learning tool for automated prediction engineering. It allows you to easily structure prediction problems and generate labels for supervised learning.
关键参数与规格
关键参数与规格
参数值
语言Python
类别Model Development
子类别Architecture
星标数515
分叉数164
贡献者1
创建日期2017-06-03
更新日期2026-09-28
1 天星标数0
7 天星标数0
排名17,968
上次排名17,746
排名变化-222
7 天星标排名16,395
上次 7 天星标排名16,407
7 天星标排名变化12
总星标排名18,930
上次总星标排名18,903
总星标排名变化-27
国家South Korea
README 摘录

Semi-supervised learning GAN in Tensorflow As part of the implementation series of Joseph Lim's group at USC, our motivation is to accelerate (or sometimes delay) research in the AI community by promoting open-source projects. To this end, we implement state-of-the-art research papers, and publicly share them with concise reports. Please visit our group github site for other projects. This project is implemented by Shao-Hua Sun and the codes have been reviewed by Jiayuan Mao

before being published. Descriptions This project is a Tensorflow implementation of **Semi-supervised Learning Generative Adversarial Networks** proposed in the paper Improved Techniques for Training GANs. The intuition is exploiting the samples generated by GAN generators to boost the performance of image classification tasks by improving generalization. In sum, **the main idea** is training a network playing both the roles of a *classifier* performing image classification task as well as a *discriminator* trained to distinguish generated samples produced by a

*generator* from the real data. To be more specific, the discriminator/classifier takes an image as input and classified it into *n+1* classes, where *n* is the number of classes of a classification task. True samples are classified into the first *n* classes and generated samples are classified into the *n+1*-th class, as shown in the figure below. The loss of this multi-task learning framework can be decomposed into the **supervised loss** , and the **GAN loss

** of a discriminator , During the training phase, we jointly minimize the total loss obtained by simply combining the two losses together. The implemented model is trained and tested on three publicly available datasets: MNIST, SVHN, and CIFAR-10. Note that this implementation only follows the main idea of the original paper while differing a lot in implementation details such as model architectures, hyperparameters, applied optimizer, etc. Also, some useful training tricks applied to this implementation are stated at the end

of this README. \*This code is still being developed and subject to change. 0 SciPy NumPy Usage Download datasets with: Train models with downloaded datasets: Test models with saved checkpoints: The *ckpt_dir* should be like: Train and test your own datasets: Create a directory Store your data as an h5py file datasets/YOUR_DATASET/data. hy and each data point contains Maintain a list datasets/YOUR_DATASET/id. txt listing ids of all data points Modify trainer. Finally, train

and test models: Results MNIST Generated samples (100th epochs) First 40 epochs SVHN Generated samples (100th epochs) First 160 epochs CIFAR-10 Generated samples (1000th epochs) First 200 epochs Training details MNIST The supervised loss The loss of Discriminator D_loss_real D_loss_fake D_loss (total loss) The loss of Generator G_loss Classification accuracy SVHN The supervised loss The loss of Discriminator D_loss_real D_loss_fake D_loss (total loss) The loss of Generator G

_loss Classification accuracy CIFAR-10 The supervised loss The loss of Discriminator D_loss_real D_loss_fake D_loss

常见问题

记录了多少星标和分叉?

clvrai/SSGAN-Tensorflow 有 515 个星标和 164 个分叉。

仓库排名是多少?

clvrai/SSGAN-Tensorflow 排名第 17,968。

记录的语言和类别是什么?

clvrai/SSGAN-Tensorflow 有 515 个星标,语言为 Python,类别为 Model Development。

哪个仓库排名最接近?

clvrai/SSGAN-Tensorflow 与 circuitnet/CircuitNet 比较,后者排名第 17,967,有 515 个星标。

README

Semi-supervised learning GAN in Tensorflow

As part of the implementation series of Joseph Lim's group at USC, our motivation is to accelerate (or sometimes delay) research in the AI community by promoting open-source projects. To this end, we implement state-of-the-art research papers, and publicly share them with concise reports. Please visit our group github site for other projects.

This project is implemented by Shao-Hua Sun and the codes have been reviewed by Jiayuan Mao before being published.

Descriptions

This project is a Tensorflow implementation of Semi-supervised Learning Generative Adversarial Networks proposed in the paper Improved Techniques for Training GANs. The intuition is exploiting the samples generated by GAN generators to boost the performance of image classification tasks by improving generalization.

In sum, the main idea is training a network playing both the roles of a classifier performing image classification task as well as a discriminator trained to distinguish generated samples produced by a generator from the real data. To be more specific, the discriminator/classifier takes an image as input and classified it into n+1 classes, where n is the number of classes of a classification task. True samples are classified into the first n classes and generated samples are classified into the n+1-th class, as shown in the figure below.

The loss of this multi-task learning framework can be decomposed into the supervised loss

,

and the GAN loss of a discriminator

,

During the training phase, we jointly minimize the total loss obtained by simply combining the two losses together.

The implemented model is trained and tested on three publicly available datasets: MNIST, SVHN, and CIFAR-10.

Note that this implementation only follows the main idea of the original paper while differing a lot in implementation details such as model architectures, hyperparameters, applied optimizer, etc. Also, some useful training tricks applied to this implementation are stated at the end of this README.

*This code is still being developed and subject to change.

Prerequisites

Usage

Download datasets with:

$ python download.py --dataset MNIST SVHN CIFAR10

Train models with downloaded datasets:

$ python trainer.py --dataset MNIST
$ python trainer.py --dataset SVHN
$ python trainer.py --dataset CIFAR10

Test models with saved checkpoints:

$ python evaler.py --dataset MNIST --checkpoint ckpt_dir
$ python evaler.py --dataset SVHN --checkpoint ckpt_dir
$ python evaler.py --dataset CIFAR10 --checkpoint ckpt_dir

The ckpt_dir should be like: train_dir/default-MNIST_lr_0.0001_update_G5_D1-20170101-194957/model-1001

Train and test your own datasets:

  • Create a directory
$ mkdir datasets/YOUR_DATASET
  • Store your data as an h5py file datasets/YOUR_DATASET/data.hy and each data point contains
    • 'image': has shape [h, w, c], where c is the number of channels (grayscale images: 1, color images: 3)
    • 'label': represented as an one-hot vector
  • Maintain a list datasets/YOUR_DATASET/id.txt listing ids of all data points
  • Modify trainer.py including args, data_info, etc.
  • Finally, train and test models:
$ python trainer.py --dataset YOUR_DATASET
$ python evaler.py --dataset YOUR_DATASET

Results

MNIST

  • Generated samples (100th epochs)

  • First 40 epochs

SVHN

  • Generated samples (100th epochs)

  • First 160 epochs

CIFAR-10

  • Generated samples (1000th epochs)

  • First 200 epochs

Training details

MNIST

  • The supervised loss

  • The loss of Discriminator

D_loss_real

D_loss_fake

D_loss (total loss)

  • The loss of Generator

G_loss

  • Classification accuracy

SVHN

  • The supervised loss

  • The loss of Discriminator

D_loss_real

D_loss_fake

D_loss (total loss)

  • The loss of Generator

G_loss

  • Classification accuracy

CIFAR-10

  • The supervised loss

  • The loss of Discriminator

D_loss_real

D_loss_fake

D_loss (total loss)

  • The loss of Generator

G_loss

  • Classification accuracy

Training tricks

  • To avoid the fast convergence of the discriminator network
    • The generator network is updated more frequently.
    • Higher learning rate is applied to the training of the generator.
  • One-sided label smoothing is applied to the positive labels.
  • Gradient clipping trick is applied to stablize training
  • Reconstruction loss with an annealed weight is applied as an auxiliary loss to help the generator get rid of the initial local minimum.
  • Utilize Adam optimizer with higher momentum.
  • Please refer to the codes for more details.

Related works

Acknowledgement

Part of codes is from an unpublished project with Jongwook Choi

排名相邻
同类项目