首页 > 其他 > 详细

深度学习-tensorflow学习笔记(2)-MNIST手写字体识别

时间:2018-05-26 19:30:59      阅读:257      评论:0      收藏:0      [点我收藏+]

          深度学习-tensorflow学习笔记(2)-MNIST手写字体识别

  这是tf入门的第一个例子。minst应该是内置的数据集。

  前置知识在学习笔记(1)里面讲过了

  这里直接上代码

  

 1 # -*- coding: utf-8 -*-
 2 """
 3 Created on Fri May 25 14:09:45 2018
 4 
 5 @author: Administrator
 6 """
 7 #导入数据集
 8 from tensorflow.examples.tutorials.mnist import input_data
 9 mnist=input_data.read_data_sets("MNIST_data/",one_hot=True)
10 #打印数据集的详情
11 print(mnist.train.images.shape,mnist.train.labels.shape)
12 print(mnist.test.images.shape,mnist.test.labels.shape)
13 print(mnist.validation.images.shape,mnist.validation.labels.shape)

  打印结果如下

  技术分享图片

  第一个是训练集的特征值和标签,第二个是测试集,第三个是验证集

  

  

深度学习-tensorflow学习笔记(2)-MNIST手写字体识别

原文:https://www.cnblogs.com/DJC-BLOG/p/9093913.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!