0

i need some your help

i can't load MNIST dataset from this.

My system enviroment is as follows
OS : Ubuntu 16.04
Python version : 3.5
Tensorflow version : 1.12

Following is my code:

import tensorflow as tf
import numpy as np

train, test = tf.keras.datasets.mnist.load_data()
train_x, train_y = train

dataset = tf.data.Dataset.from_tensor_slices(({"image":train_x}, train_y))
dataset = dataset.shuffle(100000).repeat().batch(10)

iterator = dataset.make_one_shot_iterator()
next_element = iterator.get_next()

sess = tf.Session()

print(sess.run(next_element))

when i run this code on my computer it stucks at ETA0 and doesn't finishing downloading from google like this.

Downloading data from here.
11476992/11490434 [============================>.] - ETA: 0s

What should i do on this problem, please help me... :(

iamrajshah
  • 963
  • 1
  • 11
  • 23
  • Try downloading the data manually, then pass the path like this [example](https://www.tensorflow.org/api_docs/python/tf/keras/datasets/mnist/load_data) – Anwarvic Jan 28 '19 at 06:14
  • 1
    Please, check this directory for any datasets `~/.keras` – Anwarvic Jan 28 '19 at 06:40
  • @Anwarvic Hey! it works! thanks bro! i downloaded dataset and place it to `~/.keras/datasets` manually and it works! thanks again! – TaeHwan Kim Jan 28 '19 at 07:18

2 Answers2

0

Running fine on my Linux machine with Python3, must be a network issue. Try changing the internet connection or check for proxies if any and try again.

Gunjan Raval
  • 141
  • 8
0

You may be behind a proxy... for example if you are on a corporate network.

On Windows the Python interpreter will get a proxy from your system environmental variables:

set the system variable HTTP_PROXY to the value http://yourproxy

and the system variable HTTPS_PROXY to the value http://yourproxy

Alternately, you can set the environment in a specific Python terminal session according to the answer to this post set proxy in python session

J.E.Tkaczyk
  • 557
  • 1
  • 8
  • 19