一、概述及完整代码
对MNIST(MixedNational Institute of Standard and Technology database)这个非常简单的机器视觉数据集,Tensorflow为我们进行了方便的封装,可以直接加载MNIST数据成我们期望的格式.本程序使用Softmax Regression训练手写数字识别的分类模型.
先看完整代码:
import tensorflow as tf
from tensorflow.examples.tutorials.mnist im
mnist作为最基础的图片数据集,在以后的cnn,rnn任务中都会用到
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from tensorflow.examples.tutorials.mnist import input_data
#数据集存放地址,采用0-1编码
mnist = input_data.read_data_sets('F:/mnist/data/',one_hot = T