tensorflow学习笔记5

Mnist数据集简介

import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import input_data

print("packs loaded")

print("Download and Extract MNIST dataset")
mnist = input_data.read_data_sets('data/',one_hot=True) #one_hot=True编码格式为01编码
print
print("type of 'mnist' is %s" % (type(mnist)))
print("number of train data is %d" % (mnist.train.num_examples))
print("number of test data is %d" % (mnist.test.num_examples))

原文地址:https://www.cnblogs.com/xrj-/p/14456077.html