Code for the paper "Improved Techniques for Training GANs"

Related tags

Deep Learning paper
Overview

Status: Archive (code is provided as-is, no updates expected)

improved-gan

code for the paper "Improved Techniques for Training GANs"

MNIST, SVHN, CIFAR10 experiments in the mnist_svhn_cifar10 folder

imagenet experiments in the imagenet folder

Comments
  • Reproduce CIFAR-10 Semi-Supervised

    Reproduce CIFAR-10 Semi-Supervised

    Has anyone managed to reproduce the exact results for semi-supervised learning using train_cifar_feature_matching.py? With the default hyperparameters and 4000 labeled examples, I'm overfitting and getting 32% test error after 48 epochs. Getting 0.5% training error. Paper claims to get test error of only 18.6% on this task.

    Do I need to train longer (for the full 1200 epochs?), or are others having this same problem?

    opened by christiancosgrove 5
  • ValueError: squeeze_dims[1] not in [-2,2). for 'Squeeze_1' (op: 'Squeeze') with input shapes: [?,2048].

    ValueError: squeeze_dims[1] not in [-2,2). for 'Squeeze_1' (op: 'Squeeze') with input shapes: [?,2048].

    on the calculation of inception score, after pool3 = sess.graph.get_tensor_by_name('pool_3:0'), I get pool3 with shape of [?, 2048], which makes the other line tf.matmul(tf.squeeze(pool3, [1, 2]), w) hard to understand. why do you need to squeeze pool3 ?

    opened by youkaichao 1
  • Two fixes for errors

    Two fixes for errors

    Fixing two errors that arise when running inception_score/model.py with tensorflow 1.6.0, presumably due to bit rot and deprecations in current tensorflow versions.

    The first error is

    ValueError: Tensor._shape cannot be assigned, use Tensor.set_shape instead.
    

    Commit a851dc2 addresses this error by replacing _shape with set_shape.

    After addressing this error, the second error is

    ValueError: Shape must be rank 2 but is rank 1 for 'MatMul' (op: 'MatMul') with input shapes: [2048], [2048,1008].
    

    Commit dff7439 addresses this error by retaining a singleton dimension in the squeeze operation.

    opened by catherio 1
  • Multiple calls to generate_np ignore differences in kwargs

    Multiple calls to generate_np ignore differences in kwargs

    Quoting Nicolas Carlini:

    attack = FastGradientMethod(model, sess)
    adv_1 = attack.generate_np(test_data, eps=.5)
    adv_2 = attack.generate_np(test_data, eps=.2)
    
    will result in adv_1 == adv_2, a rather unexpected result.
    

    This is because generate_np just stores one TensorFlow graph. It needs to have something like a dictionary mapping from argument values to graphs.

    opened by goodfeli 1
  • script train_imagenet.sh is missing

    script train_imagenet.sh is missing

    Hi, could you please share your script train_imagenet.sh to launch training on ImageNet? It is mentioned in the ImageNet README, but is not present in the repo. Thanks!

    opened by aosokin 1
  • cifar training is throwing an error.

    cifar training is throwing an error.

    Hi, I am getting this error when I run cifar_feature_matching or cifar_minibatch_discrimination but not when I run mnist. Please help.

    Traceback (most recent call last):
      File "train_cifar_feature_matching.py", line 51, in <module>
        gen_dat = ll.get_output(gen_layers[-1])
      File "/usr/local/lib/python2.7/dist-packages/lasagne/layers/helper.py", line 185, in get_output
        all_outputs[layer] = layer.get_output_for(layer_inputs, **kwargs)
      File "/home/bmi/Downloads/improved-gan-master/mnist_svhn_cifar10/nn.py", line 120, in get_output_for
        op = T.nnet.abstract_conv.AbstractConv2d_gradInputs(imshp=self.target_shape, kshp=self.W_shape, subsample=self.stride, border_mode='half')
    AttributeError: 'module' object has no attribute 'abstract_conv'
    
    opened by musafirsafwan 1
  • What is the license of the paper?

    What is the license of the paper?

    I see most code here is under the MIT License, but what is the copyright status for the paper published on Arxiv? Is it under any copyleft license?

    I would love to upload and distribute it on my website, but cannot do so unless the copyright allows it.

    opened by franciscop 1
  • Inference mode vs training mode

    Inference mode vs training mode

    I don't know if this question belongs here, but I am currently making a custom tf keras gan with feature matching loss and I am struggling to understand when to use inference mode on a model, that is, making use of training layers like dropout and updating batch norm parameters. This goes both for discriminator and generator as I understand that they should be trained separately.

    opened by guiandrade2 0
  • Segmentation fault

    Segmentation fault

    hello, when I run the bash train_imagenet.sh, here is an issue: TRAINING train_imagenet.sh: line 5: 4668 Segmentation fault CUDA_VISIBLE_DEVICES=0 python train_${word}.py --dataset imagenet_train --is_train True --checkpoint_dir gan/checkpoint_${word} --image_size ${pixels} --is_crop True --sample_dir gan/samples_${word} --image_width ${pixels} --batch_size 16

    opened by p577665228 0
  • AttributeError: 'module' object has no attribute 'absolute_import'

    AttributeError: 'module' object has no attribute 'absolute_import'

    I am trying to run the train_mnist_feature_matching.py code with python 3.5 but getting the error as below: File "[path]/lib/python3.5/site-packages/nn/tf.py", line 1, in from tensorflow import * AttributeError: 'module' object has no attribute 'absolute_import'

    Is this a bug?

    opened by matt-bluet 1
This is the official source code for SLATE. We provide the code for the model, the training code, and a dataset loader for the 3D Shapes dataset. This code is implemented in Pytorch.

SLATE This is the official source code for SLATE. We provide the code for the model, the training code and a dataset loader for the 3D Shapes dataset.

Gautam Singh 66 Dec 26, 2022
Code for paper ECCV 2020 paper: Who Left the Dogs Out? 3D Animal Reconstruction with Expectation Maximization in the Loop.

Who Left the Dogs Out? Evaluation and demo code for our ECCV 2020 paper: Who Left the Dogs Out? 3D Animal Reconstruction with Expectation Maximization

Benjamin Biggs 29 Dec 28, 2022
TensorFlow code for the neural network presented in the paper: "Structural Language Models of Code" (ICML'2020)

SLM: Structural Language Models of Code This is an official implementation of the model described in: "Structural Language Models of Code" [PDF] To ap

null 73 Nov 6, 2022
Code for the prototype tool in our paper "CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoning".

CoProtector Code for the prototype tool in our paper "CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoning".

Zhensu Sun 1 Oct 26, 2021
Code to use Augmented Shapiro Wilks Stopping, as well as code for the paper "Statistically Signifigant Stopping of Neural Network Training"

This codebase is being actively maintained, please create and issue if you have issues using it Basics All data files are included under losses and ea

J K Terry 32 Nov 9, 2021
Code for our method RePRI for Few-Shot Segmentation. Paper at http://arxiv.org/abs/2012.06166

Region Proportion Regularized Inference (RePRI) for Few-Shot Segmentation In this repo, we provide the code for our paper : "Few-Shot Segmentation Wit

Malik Boudiaf 138 Dec 12, 2022
Code for ACM MM 2020 paper "NOH-NMS: Improving Pedestrian Detection by Nearby Objects Hallucination"

NOH-NMS: Improving Pedestrian Detection by Nearby Objects Hallucination The offical implementation for the "NOH-NMS: Improving Pedestrian Detection by

Tencent YouTu Research 64 Nov 11, 2022
Official TensorFlow code for the forthcoming paper

~ Efficient-CapsNet ~ Are you tired of over inflated and overused convolutional neural networks? You're right! It's time for CAPSULES :)

Vittorio Mazzia 203 Jan 8, 2023
This is the code for the paper "Contrastive Clustering" (AAAI 2021)

Contrastive Clustering (CC) This is the code for the paper "Contrastive Clustering" (AAAI 2021) Dependency python>=3.7 pytorch>=1.6.0 torchvision>=0.8

Yunfan Li 210 Dec 30, 2022
Code for the paper Learning the Predictability of the Future

Learning the Predictability of the Future Code from the paper Learning the Predictability of the Future. Website of the project in hyperfuture.cs.colu

Computer Vision Lab at Columbia University 139 Nov 18, 2022
PyTorch code for the paper: FeatMatch: Feature-Based Augmentation for Semi-Supervised Learning

FeatMatch: Feature-Based Augmentation for Semi-Supervised Learning This is the PyTorch implementation of our paper: FeatMatch: Feature-Based Augmentat

null 43 Nov 19, 2022
Code for the paper A Theoretical Analysis of the Repetition Problem in Text Generation

A Theoretical Analysis of the Repetition Problem in Text Generation This repository share the code for the paper "A Theoretical Analysis of the Repeti

Zihao Fu 37 Nov 21, 2022
Code for our ICASSP 2021 paper: SA-Net: Shuffle Attention for Deep Convolutional Neural Networks

SA-Net: Shuffle Attention for Deep Convolutional Neural Networks (paper) By Qing-Long Zhang and Yu-Bin Yang [State Key Laboratory for Novel Software T

Qing-Long Zhang 199 Jan 8, 2023
Open source repository for the code accompanying the paper 'Non-Rigid Neural Radiance Fields Reconstruction and Novel View Synthesis of a Deforming Scene from Monocular Video'.

Non-Rigid Neural Radiance Fields This is the official repository for the project "Non-Rigid Neural Radiance Fields: Reconstruction and Novel View Synt

Facebook Research 296 Dec 29, 2022
Code for the Shortformer model, from the paper by Ofir Press, Noah A. Smith and Mike Lewis.

Shortformer This repository contains the code and the final checkpoint of the Shortformer model. This file explains how to run our experiments on the

Ofir Press 138 Apr 15, 2022
PyTorch code for ICLR 2021 paper Unbiased Teacher for Semi-Supervised Object Detection

Unbiased Teacher for Semi-Supervised Object Detection This is the PyTorch implementation of our paper: Unbiased Teacher for Semi-Supervised Object Detection

Facebook Research 366 Dec 28, 2022
Official code for paper "Optimization for Oriented Object Detection via Representation Invariance Loss".

Optimization for Oriented Object Detection via Representation Invariance Loss By Qi Ming, Zhiqiang Zhou, Lingjuan Miao, Xue Yang, and Yunpeng Dong. Th

ming71 56 Nov 28, 2022
Code for our CVPR 2021 paper "MetaCam+DSCE"

Joint Noise-Tolerant Learning and Meta Camera Shift Adaptation for Unsupervised Person Re-Identification (CVPR'21) Introduction Code for our CVPR 2021

FlyingRoastDuck 59 Oct 31, 2022
Code for our CVPR2021 paper coordinate attention

Coordinate Attention for Efficient Mobile Network Design (preprint) This repository is a PyTorch implementation of our coordinate attention (will appe

Qibin (Andrew) Hou 726 Jan 5, 2023