This is a tranlation of the tensorflow code to PyTorch. Original tensorflow version: https://github.com/deepmind/neural-processes
Marta Garnelo, Dan Rosenbaum, Chris J. Maddison, Tiago Ramalho, David Saxton, Murray Shanahan, Yee Whye Teh, Danilo J. Rezende, S. M. Ali Eslami. Conditional Neural Processes. ICML 2018. https://arxiv.org/abs/1807.01613
Tested with Python 3.7.3 and Pytorch 1.0.1