Coder Social home page Coder Social logo

tremblerz / manifold-flow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from johannbrehmer/manifold-flow

0.0 1.0 0.0 654.49 MB

Manifold-learning flows (ℳ-flows)

Home Page: https://arxiv.org/abs/2003.13913

License: MIT License

Python 3.73% Jupyter Notebook 95.95% Shell 0.32%

manifold-flow's Introduction

Manifold-learning flows

Johann Brehmer and Kyle Cranmer 2019-2020

arXiv NeurIPS Code style: black License: MIT

M-flow illustration figure

In the paper Flows for simultaneous manifold learning and density estimation we introduce manifold-learning flows or ℳ-flows, a new class of generative models that simultaneously learn the data manifold as well as a tractable probability density on that manifold. This repository contains our implementation of ℳ-flows, as well as the code for our experiments with them.

Getting started

Please make sure your Python environment satisfies the requirements in the environment.yml. To use the OT training, please also follow the installation instructions for geomloss.

Data sets

Data set Data dimension Manifold dimension Model parameters Arguments to train.py, and evaluate.py
Gaussian on an n-sphere d n - --dataset spherical_gaussian --truelatentdim n --datadim d --epsilon eps
Conditional Gaussian on a n-sphere d n 2 --dataset conditional_spherical_gaussian --truelatentdim n --datadim d
Mixture model on a polynomial manifold 3 2 1 --dataset power
Lorenz system 3 2 0 --dataset lorenz
Particle physics 40 14 2 --dataset lhc40d
2-D StyleGAN image manifold 64 x 64 x 3 2 0 --dataset gan2d
64-D StyleGAN image manifold 64 x 64 x 3 64 1 --dataset gan64d
CelebA-HQ 64 x 64 x 3 ? 0 --dataset celeba
ImageNet 64 x 64 x 3 ? 0 --dataset imagenet

The data from most data sets should automatically download when required. It is not necessary to generate any data yourself anymore. If there is a problem with that, please let us know.

Training

See experiments/train.py -h. The configurations for the models in the paper can be found in experiments/configs.

Note that the algorithms have different internal names from the acronyms in the paper:

Model (algorithm) Arguments to train.py
Ambient flow (AF) --algorithm flow
Flow on manifold (FOM) --algorithm mf --specified
Pseudo-invertible encoder (PIE) --algorithm pie
ℳ-flow, simultaneous training (not recommended) --algorithm mf
ℳ-flow, alternating M/D training --algorithm mf --alternate
ℳ-flow, sequential M/D training --algorithm mf --sequential
ℳ-flow, Optimal Transport training --algorithm gamf
ℳ-flow, alternating Optimal Transport training --algorithm gamf --alternate
ℳ_e-flow, simultaneous training (not recommended) --algorithm emf
ℳ_e-flow, alternating M/D training --algorithm emf --alternate
ℳ_e-flow, sequential M/D training --algorithm emf --sequential

Evaluation

See experiments/evaluate.py -h and the notebooks in experiments/notebooks. Note that the algorithms have different internal names from the acronyms in the paper:

Model (algorithm) Arguments to train.py
Ambient flow (AF) --algorithm flow
Flow on manifold (FOM) --algorithm mf --specified
Pseudo-invertible encoder (PIE) --algorithm pie
ℳ-flow (except when OT-trained) --algorithm mf
ℳ-flow, OT training --algorithm gamf

Acknowledgements

The code is largely based on the excellent Neural Spline Flow code base by C. Durkan, A. Bekasov, I. Murray, and G. Papamakarios, see 1906.04032 for their paper.

manifold-flow's People

Contributors

johannbrehmer avatar

Watchers

James Cloos 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.