04_callbacks: 'Connection to deeplearning.net timed out. (connect timeout=4)'))

I got the error when running x_train,y_train,x_valid,y_valid = get_data()

It seems like the data is not hosted on deeplearning.net. Is there a way to fix it? Thank you!

HTTPConnectionPool(host=‘deeplearning.net’, port=80): Max retries exceeded with url: /data/mnist/mnist.pkl.gz (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fd5a313ee10>, ‘Connection to deeplearning.net timed out. (connect timeout=4)’))

1 Like

I downloaded the mnist from mnist.pkl.gz
Updated my get_data() function:
def get_data(path):
if path is None:
path = datasets.download_data(MNIST_URL, ext=’.gz’)
with gzip.open(path, ‘rb’) as f:
((x_train, y_train), (x_valid, y_valid), _) = pickle.load(f, encoding=‘latin-1’)
return map(tensor, (x_train,y_train,x_valid,y_valid))

Hey! Did you manage to get the code to run in the end? I’m still having troubles downloading the dataset even though I manually converted the .tgz file to a .gz file, would love it if you could share your full code for this lesson!