面朝大海,春暖华开

focus on scientific computue, 3dgis, spatial database
专注于科学计算、GIS空间分析

 

tensorflow读取本地MNIST数据集

tensorflow读取本地MNIST数据集

数据放入文件夹(不要解压gz):

>>> import tensorflow as tf

>>> from tensorflow.examples.tutorials.mnist import input_data

>>> MNIST_data =r'D:\tensorflow\mnist'

>>> mnist = input_data.read_data_sets(MNIST_data,one_hot=True)

Extracting D:\tensorflow\mnist\train-images-idx3-ubyte.gz

WARNING:tensorflow:From d:\ProgramData\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py:267: extract_labels (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.

Instructions for updating:

Please use tf.data to implement this functionality.

Extracting D:\tensorflow\mnist\train-labels-idx1-ubyte.gz

WARNING:tensorflow:From d:\ProgramData\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py:110: dense_to_one_hot (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.

Instructions for updating:

Please use tf.one_hot on tensors.

Extracting D:\tensorflow\mnist\t10k-images-idx3-ubyte.gz

Extracting D:\tensorflow\mnist\t10k-labels-idx1-ubyte.gz

WARNING:tensorflow:From d:\ProgramData\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py:290: DataSet.__init__ (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.

Instructions for updating:

Please use alternatives such as official/mnist/dataset.py from tensorflow/models.

posted on   风过 无痕  阅读(10168)  评论(0编辑  收藏  举报

(评论功能已被禁用)
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2006-02-20 one good website for opensource

导航

统计

向日葵支付宝收钱码
点击右上角即可分享
微信分享提示