Skip to content

Code for the Neural Processes website and replication of 4 papers on NPs. Pytorch implementation.

License

Notifications You must be signed in to change notification settings

YannDubs/Neural-Process-Family

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural Process Family License: MIT Python 3.6+

Main entry point: Neural Process Family website.

What ?

This repository contains:

For tutorials on how to use the npf library refer to the reproducability section of the NPF website.

Install

Pip

# clone repo
pip install -r requirements.txt

Note that the version of skorch must be 0.8 to ensure that the pretrained models can be correctly uploaded.

Docker

  1. Install nvidia-docker

  2. Build your image using Dockerfile or pull docker pull yanndubs/npf:gpu

  3. Create and run a container, e.g.: docker run --gpus all --init -d --ipc=host --name npf -v $PWD:/Neural-Process-Family -p 8888:8888 -p 6006:6006 yanndubs/npf:gpu jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root

Examples

Check the website for many plots and the code to produce them. Here is a teaser:

Sample functions from the predictive distribution of ConvLNPs (blue) and the oracle GP (green) with periodic and noisy Matern kernels:

Samples from ConvLNP trained on GPs

Increasing the resolution of 16x16 CelebA to 128x128 with a ConvCNP.:

Increasing image resolution with ConvCNP

Cite

When using one of the models implemented in this repo in academic work please cite the corresponding paper (linked at the top of the README).

In case you want to cite the NPF website or this specific implementation of the NPs then you can use:

@misc{dubois2020npf,
  title        = {Neural Process Family},
  author       = {Dubois, Yann and Gordon, Jonathan and Foong, Andrew YK},
  month        = {September},
  year         = {2020},
  howpublished = {\url{http://yanndubs.github.io/Neural-Process-Family/}}
}