pyro-ppl / pyro

Deep universal probabilistic programming with Python and PyTorch
http://pyro.ai
Apache License 2.0
8.56k stars 986 forks source link

Cannot reproduce "Attend Infer Repeat" #2048

Closed 1587causalai closed 5 years ago

1587causalai commented 5 years ago

Hello,

I cannot reproduce the example https://pyro.ai/examples/air.html

When I run the following codes:

%pylab inline
import os
from collections import namedtuple
import pyro
import pyro.optim as optim
from pyro.infer import SVI, TraceGraph_ELBO
import pyro.distributions as dist
import pyro.poutine as poutine
import pyro.contrib.examples.multi_mnist as multi_mnist
import torch
import torch.nn as nn
from torch.nn.functional import relu, sigmoid, softplus, grid_sample, affine_grid
import numpy as np

smoke_test = ('CI' in os.environ)
assert pyro.__version__.startswith('0.4.1')
pyro.enable_validation(True)
inpath = '../../examples/air/.data'
X_np, _ = multi_mnist.load(inpath)

I got an HTTPError.

0it [00:00, ?it/s]
downloading data
Downloading https://d2fefpcigoriu7.cloudfront.net/datasets/mnist/train-images-idx3-ubyte.gz to ../../examples/air/.data/MNIST/raw/train-images-idx3-ubyte.gz
0it [00:00, ?it/s]
Failed download. Trying https -> http instead. Downloading http://d2fefpcigoriu7.cloudfront.net/datasets/mnist/train-images-idx3-ubyte.gz to ../../examples/air/.data/MNIST/raw/train-images-idx3-ubyte.gz
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)

I should get the dataset X_np.

neerajprad commented 5 years ago

Our AWS S3 bucket had to be changed recently, so this will not unfortunately work with the release code that directs to the earlier URL. If you use the code from our dev branch (and install it using pip install -e .), this should work correctly. Let me know if you face any issues.