Giter Club home page Giter Club logo

nf4ip's Introduction

NF4IP

Normalising Flows for Inverse Problems (NF4IP) is a Python framework that provides all means for usage of normalising flows in solving inverse problems. The framework allows low-key usage of recent advances in machine learning for analysis of experimental data based on Surrogate Models as well as one-step solution to inverse problems.

The framework is being collaboratively developed by

Maintainer:

Introduction

The aim of this project is to make it easier to solve inverse problems. NF4IP is based on FrEIA from Heidelberg University, though while FrEIA provides a toolbox for building invertible networks, NF4IP uses this toolbox to offer a selection of ready-to-use network architectures tailored to inverse problems typically encountered in physics.

In addition, NF4IP already offers useful features that simplify the development of your machine learning application:

  • powerful configuration options with defaults, config files and commandline arguments.
  • a code generator to give you a quick start with your project
  • checkpointing: automatically save your learning progress and restore from it.
  • Filter/Hook system to customize the application and plug your code into the library
  • Plugin/Extension System to extend the functionality
  • These extensions are currently available:
    • NF implementation
    • Tensorboard logging
    • Variational Autoencoder

Installation

To install NF4IP, clone this repository, enter the cloned directory and install it locally using pip:

git clone https://github.com/Photon-AI-Research/NF4IP.git
cd NF4IP
pip install -e setup.py

The -e will make an editable install, so you can edit the NF4IP library any time and see the effect instantly.

Getting started

You can start generating your first project by executing:

NF4IP generate project <targetDir>

where is the directory where the new project will be generated. This tutorial assumes that you used the default "myapp" label name.

After executing this command and answering all questions, you can open the targetDir in your favorite IDE. If you have no preference, we recommend the free pyCharm community edition.

The directory structure created is basicly a Cement 3.0-Project. The NF4IP documentation will already give you everything you need to know to start your first project. Additionally, cement got its own documentation which should be consulted if there are open questions concerning the generation of CLI applications based on NF4IP.

Framework Developer Instructions

These instructions are for anyone interested in improving NF4IP itself. The following steps are not necessary if you want to develop an application based on NF4IP. This project includes a number of helpers in the Makefile to streamline common development tasks.

Environment Setup

The following demonstrates setting up and working with a development environment:

### create a virtualenv for development

$ make virtualenv

$ source env/bin/activate


### run NF4IP cli application

$ NF4IP --help


### run pytest / coverage

$ make test

Releasing to PyPi

Before releasing to PyPi, you must configure your login credentials:

~/.pypirc:

[pypi]
username = YOUR_USERNAME
password = YOUR_PASSWORD

Then use the included helper function via the Makefile:

$ make dist

$ make dist-upload

Deployments

Docker

Included is a basic Dockerfile for building and distributing NF4IP, and can be built with the included make helper:

$ make docker

$ docker run -it NF4IP --help

nf4ip's People

Contributors

nih23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.