This is the repository for the Code of Evidential Conditional Neural Processes
The appendix and supplimentary works of the paper are provided in appendix.pdf file
- Python3
- Pytorch
- Synthetic Datasets: Sinusoidal regression and GP regression (generated in the code itself)
- Real world Image Completion Datasets: MNIST, CelebA and Cifar10
Download the datasets and organize the datasets with following structure
datasets/
├── celeba
│ ├── test
│ ├── train
│ └── val
├── cifar10
│ ├── test
│ └── train
└── mnist
├── test
└── train
Celeba has just 1 folder in both train and test consisting of all the task imags
MNIST and Cifar10 should have 10 folders (numbered 0 - 9 corresponding to the 10 classes) in both train and test.
enp_run.py
is used to run ECNP-A and ECNP
For eg. to run 50-shot image-completion experiment with mnist for ECNP, use
python3 enp_run.py --dataset "mnist" -use_det "true" -use_lat "false" --max_context_points 50 --model_type "CNP"
np_baseline.py
script can be used to run the baseline models
For eg. to run 50 shot image completion experiment with mnist for CNP, use
python3 np_baseline.py --dataset "mnist" -use_det "true" -use_lat "false" --max_context_points 50 --model_type "CNP"
Additionally, various hyperparameters and settings can be specified using the utilFiles/get_args.py
file
- ANP anc CNP Official Codes - https://github.com/deepmind/neural-processes