pytorch-convcnp
pytorch-convcnp copied to clipboard
A PyTorch Implementation of Convolutional Conditional Neural Process.
ConvCNP: Convolutional Conditional Neural Process, in PyTorch
A PyTorch implementation of Convolutional Conditional Neural Process from the 2019 paper (arXiv, ICLR2020) by Jonathan Gordon, Wessel P. Bruinsma, Andrew Y. K. Foong, James Requeima, Yann Dubois, and Richard E. Turner.
(The original code is not published as of 2019/12/28)

Table of Contents
- Dependencies
- Datasets
- Train
- Demonstration
- Reference
Dependencies
- Python 3.7+
- PyTorch 1.3
- GPyTorch 1.0
- Numpy 1.16+
- Scikit-learn 0.21
- Fastprogress 0.1.21
Datasets
1D Regression
We provide several kernels to generate datasets for syntethic 1D regression:
- EQ Kernel
- Matern-5/2 Kernel
- Periodic Kernel
2D Regression
- MNIST
- CIFAR10
Train
1D Regression
$ python main1d.py --kernel [eq | matern | periodic]
2D Regression
$ python main2d.py --dataset [mnist | cifar10] # Highly recommend to run this code in your GPU environment!
Demonstration
CIFAR10 Prediction

If you want some more demo (1D reg.), please see our jupyter notebooks.
Reference
- Jonathan Gordon et al. "Convolutional Conditional Neural Processes" ICLR2020 (accepted)