TensorFlow下MNIST数据集下载脚本input_data.py
来源:互联网 发布:淘宝联盟提现钱没到账 编辑:程序博客网 时间:2024/05/17 07:35
TensorFlow官方文档里面,MNIST数据集下载脚本。 网页原始url打不开,这里给出github地址。下面也贴出源码。
下面代码存为input_data.py
文件
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.# =============================================================================="""Functions for downloading and reading MNIST data."""from __future__ import absolute_importfrom __future__ import divisionfrom __future__ import print_functionimport gzipimport osimport tempfileimport numpyfrom six.moves import urllibfrom six.moves import xrange # pylint: disable=redefined-builtinimport tensorflow as tffrom tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets
使用时新建test.py
文件(与input_data.py
在同一工程目录下,比如我的是E:\Anaconda3\Lib\site-packages\tensorflow\examples\tutorials\mnist
),执行下面命令来下载MNIST数据集,就会在mnist文件夹
下生成一个data文件夹
,如图:
#下载用于训练和测试的mnist数据集的源码import input_data # 调用input_datamnist = input_data.read_data_sets('data/', one_hot=True)
可以看到有55000张的训练数据和10000张的测试数据
0 0
- TensorFlow下MNIST数据集下载脚本input_data.py
- 关于TensorFlow的MNIST数据集下载脚本input_data.py的坑
- TensorFlow学习--MNIST入门(附脚本input_data.py)
- 获取mnist训练数据集input_data.py
- tensorflow下数据集MNIST下载源代码
- tensorflow运行mnist时的input_data.py文件
- tensorflow教程中的mnist数据下载脚本
- tensorflow教程中的mnist数据下载脚本
- tensorflow 中MNIST数据集下载
- tensorflow中下载mnist数据集
- Tensorflow教程-MNIST 数据下载
- Ubuntu下Tensorflow加载MNIST数据集(数据下载和读取)
- Ubuntu下Tensorflow加载MNIST数据集(数据下载和读取)
- TensorFlow MNIST机器学习入门 input_data.py only integer scalar arrays can be converted to a scalar
- tensorflow MNIST数据集
- tensorflow mnist训练集input.py代码
- tensorflow mnist.py分析
- 使用tensorflow导入已经下载好的mnist数据集
- JavaScript 实现面向对象(入门)
- Kafka之sync、async以及oneway
- eclipse的代码不全功能
- CentOS下使用yum安装Mysql,以及Mysql主从复制的配置
- 两字符串比较函数
- TensorFlow下MNIST数据集下载脚本input_data.py
- 410. Split Array Largest Sum
- 如何创建一个最简单的Windows桌面应用程序 (C++)
- <机器学习>(周志华)读书笔记 -- 第一章 绪论
- windows下安装python的numpy模块
- 性能测试知多少---了解前端性能
- C/C++信息隐写术(四)之大程序藏入BMP文件
- U-Boot 中 PING 命令处理流程
- 递归算法-->整数划分