Giter Club home page Giter Club logo

gin's Introduction

GIN

Code for the paper "Disentanglement by Nonlinear ICA with General Incompressible-flow Networks (GIN)" (2020)

Prerequisites

Make sure you have numpy and pytorch installed (recommended versions below). Then install FrEIA:

pip install git+https://github.com/VLL-HD/FrEIA.git

Recommended package versions

The scripts in this repository were tested with the following package versions (may also work with earlier versions, eg python 3.7):

  • python 3.8.3
  • numpy 1.18.1
  • matplotlib 3.1.3
  • pytorch 1.5.0
  • torchvision 0.6.0
  • cudatoolkit 10.2.89

Tests were made with both CPU (artificial data only) and GPU (artificial data and EMNIST).

Usage

Clone the repository:

git clone https://github.com/VLL-HD/GIN.git
cd GIN

Artificial Data

To see the available options:

python artificial_data.py -h

Reconstructions are saved in ./artificial_data_save/{timestamp}/figures. Eight reconstructions are plotted, each corresponding to a different orientation of the reconstructed latent space.

Example reconstruction plot:

artificial_data_reconstruction_plot

EMNIST

To see the available options:

python emnist.py -h

Model checkpoints (.pt files) are saved in ./emnist_save/{timestamp}/model_save with the specified save frequency. Figures are saved in ./emnist_save/{timestamp}/figures whenever a checkpoint is made (including at the end of training).

Example plots:

emnist_spectrum emnist_first_dim

For further details please refer to the paper.

gin's People

Contributors

psorrenson avatar julssg avatar tianjiao-j 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.