mnist数据集

# -*- coding: utf-8 -*-
"""
Created on Sat Jul 21 19:17:29 2018

@author: Administrator
"""

import tensorflow as tf


from tensorflow.examples.tutorials.mnist import input_data

mnist = input_data.read_data_sets("C:\\Users\\Administrator\\Desktop\\task\\MNIST_data",one_hot = True)

# What does the data of MNIST look like?
print ("What does the data of MNIST look like?")
trainimg = mnist.train.images
trainlabel = mnist.train.labels
testimg = mnist.test.images
testlabel = mnist.test.labels

print ("type of 'trainimg' is %s "  % (type(trainimg)))
print ("type of 'trainlabel' is %s "% (type(trainlabel)))
print ("type of 'testimg' is %s"    % (type(testimg)) )
print ("type of 'testlabel' is %s"  % (type(testlabel)))

print ("shape of trainimg is %s"    % (trainimg.shape,))
print ("shape of 'trainlabel' is %s" % (trainlabel.shape,))
print ("shape of 'testimg' is %s" % (testimg.shape,))
print ("shape of 'testlabel' is %s" %(testlabel.shape,))
 

猜你喜欢

转载自blog.csdn.net/qq_41858768/article/details/81153179
今日推荐