Giter VIP home page Giter VIP logo

mintnet's Introduction

MintNet: Building Invertible Neural Networks with Masked Convolutions

This repository contains the PyTorch implementation of our paper: MintNet: Building Invertible Neural Networks with Masked Convolutions, NeurIPS 2019 . We propose a new way of constructing invertible neural networks by combining simple building blocks with a novel set of composition rules. This leads to a rich set of invertible architectures, including those similar to ResNets. Inversion is achieved with a locally convergent iterative procedure that is parallelizable and very fast in practice. Additionally, the determinant of the Jacobian can be computed analytically and efficiently, enabling their generative use as flow models.

Dependencies

The following are packages needed for running this repo.

  • PyTorch==1.1.0
  • tqdm
  • tensorboardX
  • Scipy
  • PyYAML
  • Numba

Running the experiments

python main.py --runner [runner name] --config [config file] --doc [experiment folder name]

Here runner name is one of the following:

  • DensityEstimationRunner. Experiments on MintNet density estimation.
  • ClassificationRunner. Experiments on MintNet classification.

config file is the directory of some YAML file in configs/, and experiment folder name is the folder names in run/.

For example, if you want to train MintNet density estimation model on MNIST, just run

python main.py --runner DensityEstimationRunner --config mnist_density_config.yml

Checkpoints

Checkpoints for both density estimation and classification can be downloaded from https://drive.google.com/file/d/12kGMMg0ivJI5y32hRouhZuddr9cJxfiR/view?usp=sharing

Unzip it to <root folder>/run.

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.