Code for reproducing key results in the paper "InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets"

Related tags

Deep Learning paper
Overview

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

InfoGAN

Code for reproducing key results in the paper InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets by Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, Pieter Abbeel.

Dependencies

This project currently requires the dev version of TensorFlow available on Github: https://github.com/tensorflow/tensorflow. As of the release, the latest commit is 79174a.

In addition, please pip install the following packages:

  • prettytensor
  • progressbar
  • python-dateutil

Running in Docker

$ git clone [email protected]:openai/InfoGAN.git
$ docker run -v $(pwd)/InfoGAN:/InfoGAN -w /InfoGAN -it -p 8888:8888 gcr.io/tensorflow/tensorflow:r0.9rc0-devel
root@X:/InfoGAN# pip install -r requirements.txt
root@X:/InfoGAN# python launchers/run_mnist_exp.py

Running Experiment

We provide the source code to run the MNIST example:

PYTHONPATH='.' python launchers/run_mnist_exp.py

You can launch TensorBoard to view the generated images:

tensorboard --logdir logs/mnist
Comments
  • Publish the Model code for non-mnist tasks

    Publish the Model code for non-mnist tasks

    The code in models/regularized_gan.py (here) defines the tensorflow model for training a GAN network to generate mnist data.

    The if network_type == "mnist": line strongly implies that the model would look different for other tasks.

    Can this same model be used for the other tasks described in the paper, such as 3d faces or CelebA? (Assuming we change the input codes, of course.)

    Thanks! :)

    opened by NHDaly 9
  • The default provided experiment doesn't save the model it trained.

    The default provided experiment doesn't save the model it trained.

    The README says:

    Running Experiment

    We provide the source code to run the MNIST example:

    python launchers/run_mnist_exp.py

    You can launch TensorBoard to view the generated images:

    tensorboard --logdir logs/mnist

    But running that experiment produces only a single log in logs, but no checkpoints in ckt and no logs after the model has trained. It's disappointing because I ran the experiment over a day and then it finished, and now all that work is gone.

    root@cbe2bb86132a:/InfoGAN# find ckt
    ckt
    ckt/mnist
    ckt/mnist/mnist_2016_08_15_03_18_12
    
    root@cbe2bb86132a:/InfoGAN# find logs
    logs
    logs/mnist
    logs/mnist/mnist_2016_08_15_03_18_12
    logs/mnist/mnist_2016_08_15_03_18_12/events.out.tfevents.1471231106.cbe2bb86132a
    

    Is there some flag setting I need to set to get useful output? If so, can that be the default? Thanks!

    opened by NHDaly 3
  • OOM on Titan X

    OOM on Titan X

    W tensorflow/core/common_runtime/bfc_allocator.cc:271] Ran out of memory trying to allocate 24.50MiB.  See logs for memory state.
    W tensorflow/core/framework/op_kernel.cc:909] Resource exhausted: OOM when allocating tensor with shape[6272,1024]
    

    Looks like two devices are being created on the same device [last 2 lines]?

    > python launchers/run_mnist_exp.py
    I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so locally
    I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.so locally
    I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so locally
    I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.so locally
    I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.so locally
    Extracting MNIST/train-images-idx3-ubyte.gz
    Extracting MNIST/train-labels-idx1-ubyte.gz
    Extracting MNIST/t10k-images-idx3-ubyte.gz
    Extracting MNIST/t10k-labels-idx1-ubyte.gz
    I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties:
    name: GeForce GTX TITAN X
    major: 5 minor: 2 memoryClockRate (GHz) 1.076
    pciBusID 0000:06:00.0
    Total memory: 12.00GiB
    Free memory: 496.40MiB
    I tensorflow/core/common_runtime/gpu/gpu_init.cc:126] DMA: 0
    I tensorflow/core/common_runtime/gpu/gpu_init.cc:136] 0:   Y
    I tensorflow/core/common_runtime/gpu/gpu_device.cc:806] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX TITAN X, pci bus id: 0000:06:00.0)
    I tensorflow/core/common_runtime/gpu/gpu_device.cc:806] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX TITAN X, pci bus id: 0000:06:00.0)
    

    Running tf0.9

    opened by jramapuram 2
  • Fix TF `victoriametrics-cluster` to work w/ hashicorp/kubernetes v2.8.0.

    Fix TF `victoriametrics-cluster` to work w/ hashicorp/kubernetes v2.8.0.

    2022-02-10T10:10:25.079-0800 [TRACE] plugin.terraform-provider-kubernetes_v2.8.0_x5: Served request: tf_req_id=05f706a8-2360-b657-8ac1-faf1085ba708 tf_resource_type=kubernetes_manifest EXTRA_VALUE_AT_END=<nil> tf_proto_version=5.2 tf_provider_addr= tf_rpc=PlanResourceChange @caller=/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-kubernetes/vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/protocol.go:21 @module=sdk.proto timestamp=2022-02-10T10:10:25.078-0800
    2022/02/10 10:10:25 [TRACE] EvalWriteState: writing current state object for module.victoriametrics-cluster-stack.kubernetes_manifest.vmselect-statefulset[0]
    2022/02/10 10:10:25 [TRACE] EvalWriteDiff: recorded NoOp change for module.victoriametrics-cluster-stack.kubernetes_manifest.vmselect-statefulset[0]
    2022/02/10 10:10:25 [TRACE] vertex "module.victoriametrics-cluster-stack.kubernetes_manifest.vmselect-statefulset[0]": visit complete
    2022/02/10 10:10:25 [TRACE] vertex "module.victoriametrics-cluster-stack.kubernetes_manifest.vmselect-statefulset": dynamic subgraph completed successfully
    2022/02/10 10:10:25 [TRACE] vertex "module.victoriametrics-cluster-stack.kubernetes_manifest.vmselect-statefulset": visit complete
    2022/02/10 10:10:25 [TRACE] vertex "module.victoriametrics-cluster-stack.kubernetes_manifest.vmselect-statefulset (expand)": dynamic subgraph completed successfully
    2022/02/10 10:10:25 [TRACE] vertex "module.victoriametrics-cluster-stack.kubernetes_manifest.vmselect-statefulset (expand)": visit complete
    2022/02/10 10:10:25 [TRACE] dag/walk: upstream of "module.victoriametrics-cluster-stack.provider[\"registry.terraform.io/hashicorp/kubernetes\"] (close)" errored, so skipping
    2022/02/10 10:10:25 [TRACE] dag/walk: upstream of "module.victoriametrics-cluster-stack (close)" errored, so skipping
    2022/02/10 10:10:25 [TRACE] dag/walk: upstream of "meta.count-boundary (EachMode fixup)" errored, so skipping
    2022/02/10 10:10:25 [TRACE] dag/walk: upstream of "root" errored, so skipping
    2022/02/10 10:10:25 [INFO] backend/local: plan operation completed
    
    opened by emypar 0
  • [Snyk] Security upgrade pygments from 2.5.2 to 2.7.4

    [Snyk] Security upgrade pygments from 2.5.2 to 2.7.4

    Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.

    Changes included in this PR

    • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
      • requirements.txt

    Vulnerabilities that will be fixed

    By pinning:

    Severity | Priority Score (*) | Issue | Upgrade | Breaking Change | Exploit Maturity :-------------------------:|-------------------------|:-------------------------|:-------------------------|:-------------------------|:------------------------- high severity | 661/1000
    Why? Recently disclosed, Has a fix available, CVSS 7.5 | Denial of Service (DoS)
    SNYK-PYTHON-PYGMENTS-1088505 | pygments:
    2.5.2 -> 2.7.4
    | No | No Known Exploit

    (*) Note that the real score may have changed since the PR was raised.

    Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the effected dependencies could be upgraded.

    Check the changes in this PR to ensure they won't cause issues with your project.


    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

    For more information: 🧐 View latest project report

    🛠 Adjust project settings

    📚 Read more about Snyk's upgrade and patch logic

    opened by oai-snyk-bot 0
  • Seek for

    Seek for "faces" dataset

    Hello, I want to experiment with the "faces" dataset, so I wonder how you gain your faces dataset? I also download the MATLAB code about the "Basel face model", but I didn't find the parameters about the light, pose and the elevation.

    opened by LittlelittleZ 0
  • Readme: Add options to commands to fix issues

    Readme: Add options to commands to fix issues

    The Docker container is mapping port 8888 from guest to host but Tensorboard starts on port 6006. Add port option to Tensorboard to start on the specified port. Add PYTHONPATH environment variable to python command in Docker section to solve issue with conflicting imports.

    opened by rodrigobdz 0
  • Readme: Update Docker image name

    Readme: Update Docker image name

    Replace link to gcr.io and link instead to the same image on Docker Hub as it doesn't work anymore.

    See link to tensorflow/tensorflow:r0.9rc0-devel.

    Fixes https://github.com/openai/InfoGAN/issues/30.

    opened by rodrigobdz 0
  • docker pull error

    docker pull error

    when I run

    docker pull gcr.io/tensorflow/tensorflow:r0.9rc0-devel
    

    Occur this error below.

    Error response from daemon: manifest for gcr.io/tensorflow/tensorflow:r0.9rc0-devel not found
    

    docker image not found.

    opened by rh01 0
  • Code not consistent with the paper formulation

    Code not consistent with the paper formulation

    Hi,

    I read the paper of InfoGAN (https://arxiv.org/abs/1606.03657) and I found that it has the objective function for Discriminator (D), Generator (G), and mutual information network (Q) in equation (6).

    So, in the implementation, D is to maximize the part which originally for GAN, G is to minimize its own part for GAN minus the mutual information times a tuning lambda, and Q is to maximize the mutual information as it uses a lower bound for mutual information.

    However, in this InfoGAN official code, I actually found in InfoGAN/infogan/algos/infogan_trainer.py that:

    discriminator_loss -= self.info_reg_coeff * disc_mi_est
    generator_loss -= self.info_reg_coeff * disc_mi_est
    

    So both the discriminator loss and the generator loss incorporate the mutual information lower bound. I found this is not consistent with the paper.

    First, the discriminator loss does not have the mutual information lower bound in the formulation. Although the paper says it constructed Q network from the last hidden layer of D, training the D network should not incorporate the mutual information lower bound value.

    Second, in equation (6) or any other GANs, G and D should always have opposite signs (+ or -) for the same term. But the paired code above used mutual information both to be the negative sign for D and G to minimize. This does not make sense and it means the equation (6) in paper is not correct and should be changed.

    Could you help me with this?

    opened by hengshiyu 2
Code for reproducing our analysis in the paper titled: Image Cropping on Twitter: Fairness Metrics, their Limitations, and the Importance of Representation, Design, and Agency

Image Crop Analysis This is a repo for the code used for reproducing our Image Crop Analysis paper as shared on our blog post. If you plan to use this

Twitter Research 239 Jan 2, 2023
PyTorch framework, for reproducing experiments from the paper Implicit Regularization in Hierarchical Tensor Factorization and Deep Convolutional Neural Networks

Implicit Regularization in Hierarchical Tensor Factorization and Deep Convolutional Neural Networks. Code, based on the PyTorch framework, for reprodu

Asaf 3 Dec 27, 2022
Reproducing code of hair style replacement method from Barbershorp.

Barbershorp Reproducing code of hair style replacement method from Barbershorp. Also reproduces II2S, an improved version of Image2StyleGAN. Requireme

null 1 Dec 24, 2021
The LaTeX and Python code for generating the paper, experiments' results and visualizations reported in each paper is available (whenever possible) in the paper's directory

This repository contains the software implementation of most algorithms used or developed in my research. The LaTeX and Python code for generating the

João Fonseca 3 Jan 3, 2023
Repository for reproducing `Model-Based Robust Deep Learning`

Model-Based Robust Deep Learning (MBRDL) In this repository, we include the code necessary for reproducing the code used in Model-Based Robust Deep Le

Alex Robey 16 Sep 19, 2022
PySlowFast: video understanding codebase from FAIR for reproducing state-of-the-art video models.

PySlowFast PySlowFast is an open source video understanding codebase from FAIR that provides state-of-the-art video classification models with efficie

Meta Research 5.3k Jan 3, 2023
This code reproduces the results of the paper, "Measuring Data Leakage in Machine-Learning Models with Fisher Information"

Fisher Information Loss This repository contains code that can be used to reproduce the experimental results presented in the paper: Awni Hannun, Chua

Facebook Research 43 Dec 30, 2022
Code for sound field predictions in domains with impedance boundaries. Used for generating results from the paper

Code for sound field predictions in domains with impedance boundaries. Used for generating results from the paper

DTU Acoustic Technology Group 11 Dec 17, 2022
Code to reproduce the results in the paper "Tensor Component Analysis for Interpreting the Latent Space of GANs".

Tensor Component Analysis for Interpreting the Latent Space of GANs [ paper | project page ] Code to reproduce the results in the paper "Tensor Compon

James Oldfield 4 Jun 17, 2022
This repository contains the code and models necessary to replicate the results of paper: How to Robustify Black-Box ML Models? A Zeroth-Order Optimization Perspective

Black-Box-Defense This repository contains the code and models necessary to replicate the results of our recent paper: How to Robustify Black-Box ML M

OPTML Group 2 Oct 5, 2022
This repository contains the code and models necessary to replicate the results of paper: How to Robustify Black-Box ML Models? A Zeroth-Order Optimization Perspective

Black-Box-Defense This repository contains the code and models necessary to replicate the results of our recent paper: How to Robustify Black-Box ML M

OPTML Group 2 Oct 5, 2022
Capture all information throughout your model's development in a reproducible way and tie results directly to the model code!

Rubicon Purpose Rubicon is a data science tool that captures and stores model training and execution information, like parameters and outcomes, in a r

Capital One 97 Jan 3, 2023
Code used to generate the results appearing in "Train longer, generalize better: closing the generalization gap in large batch training of neural networks"

Train longer, generalize better - Big batch training This is a code repository used to generate the results appearing in "Train longer, generalize bet

Elad Hoffer 145 Sep 16, 2022
Code to reproduce the results for Compositional Attention: Disentangling Search and Retrieval.

Compositional-Attention This repository contains the official implementation for the paper Compositional Attention: Disentangling Search and Retrieval

Sarthak Mittal 17 Oct 23, 2021
Code to reproduce the results for Statistically Robust Neural Network Classification, published in UAI 2021

Code to reproduce the results for Statistically Robust Neural Network Classification, published in UAI 2021

null 1 Jun 2, 2022
Segcache: a memory-efficient and scalable in-memory key-value cache for small objects

Segcache: a memory-efficient and scalable in-memory key-value cache for small objects This repo contains the code of Segcache described in the followi

TheSys Group @ CMU CS 78 Jan 7, 2023
We envision models that are pre-trained on a vast range of domain-relevant tasks to become key for molecule property prediction

We envision models that are pre-trained on a vast range of domain-relevant tasks to become key for molecule property prediction. This repository aims to give easy access to state-of-the-art pre-trained models.

GMUM 90 Jan 8, 2023
Key information extraction from invoice document with Graph Convolution Network

Key Information Extraction from Scanned Invoices Key information extraction from invoice document with Graph Convolution Network Related blog post fro

Phan Hoang 39 Dec 16, 2022
Ultra-lightweight human body posture key point CNN model. ModelSize:2.3MB HUAWEI P40 NCNN benchmark: 6ms/img,

Ultralight-SimplePose Support NCNN mobile terminal deployment Based on MXNET(>=1.5.1) GLUON(>=0.7.0) framework Top-down strategy: The input image is t

null 223 Dec 27, 2022