简体   繁体   English

为什么我的代码无法从Google加载MNIST数据集?

[英]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.

相关问题 为什么我无法使用 load_data() 方法加载 mnist 数据集? - Why I can't load mnist dataset with load_data() method? 如何从我的谷歌驱动器加载数据集 - How to load a dataset from my google drive 无法使用 sklearn 加载“mnist-original”数据集 - Can't load 'mnist-original' dataset using sklearn 无法在keras中加载mnist数据集 - cant load mnist dataset in keras 有人可以解释一下这个 tensorflow 代码数据集,metadata = tfds.load('fashion_mnist', as_supervised=True, with_info=True) - can someone explain this tensorflow line of code dataset, metadata = tfds.load('fashion_mnist', as_supervised=True, with_info=True) 从目录加载图像数据集,而不是从 tf.load 加载 MNIST 数据集 - Load image dataset from directory in place of MNIST dataset from tf.load 我如何从filepath格式化我的图像到与python中的mnist.load_data()相同的方式? - How can i format my images from filepath to the same way as mnist.load_data() in python? 从MNIST数据集中提取类 - Extract classes from MNIST dataset 加载自定义数据集,如 Mnist (Tensorflow Python) - Load custom dataset like Mnist ( Tensorflow Python ) 如何在 Tensorflow Fedarated 中加载 Fashion MNIST 数据集? - How to load Fashion MNIST dataset in Tensorflow Fedarated?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM