[英]why my code can not load MNIST dataset from google?
i need some your help 我需要你的帮助
i can't load MNIST dataset from this. 我不能从中加载MNIST数据集。
My system enviroment is as follows 我的系统环境如下
OS : Ubuntu 16.04 操作系统:Ubuntu 16.04
Python version : 3.5 python版本:3.5
Tensorflow version : 1.12 Tensorflow版本: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. 当我在计算机上运行此代码时,它停留在ETA0上,并且还没有像这样完成从Google的下载。
Downloading data from here. 从此处下载数据。
11476992/11490434 [============================>.] - ETA: 0s 11476992/11490434 [============================>。]-ETA:0秒
What should i do on this problem, please help me... :( 在这个问题上我该怎么办,请帮助我... :(
Running fine on my Linux machine with Python3, must be a network issue. 在使用Python3的Linux机器上正常运行,一定是网络问题。 Try changing the internet connection or check for proxies if any and try again.
尝试更改Internet连接或检查代理(如果有),然后重试。
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: 在Windows上,Python解释器将从您的系统环境变量获取代理:
set the system variable HTTP_PROXY to the value http://yourproxy
将系统变量HTTP_PROXY设置为值
http://yourproxy
and the system variable HTTPS_PROXY to the value http://yourproxy
并将系统变量HTTPS_PROXY设置为值
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 或者,您可以根据python会话中此帖子集代理的答案,在特定的Python终端会话中设置环境
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.