Main entry point: Neural Process Family website.
This repository contains:
- the text of the Neural Process Family webiste
- the Pytorch code (training / plotting) as well as pretrained model to investigate the following models on image and synthetic 1D datasets:
- CNP from Conditional Neural Processes
- LNP from Neural Processes
- AttnCNP and AttnLNP from Attentive Neural Processes
- ConvCNP from Convolutional Conditional Neural Processes
- ConvLNP from Meta-Learning Stationary Stochastic Process Prediction with Convolutional Neural Processes
- the ("official") code to replicate all the image experiments from Convolutional Conditional Neural Processes and Meta-Learning Stationary Stochastic Process Prediction with Convolutional Neural Processes. For 1D experiments see ConvNP and ConvCNP.
For tutorials on how to use the npf library refer to the reproducability section of the NPF website.
# 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.
-
Install nvidia-docker
-
Build your image using
Dockerfile
or pulldocker pull yanndubs/npf:gpu
-
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
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:
Increasing the resolution of 16x16 CelebA to 128x128 with a ConvCNP.:
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/}}
}