MNIST手写数字图像数据库
60000个训练集,10000个测试集,灰度图,大小均为28*28
数据集网址:http://yann.lecun.com/exdb/mnist/
train-images-idx3-ubyte.gz: training set images (9912422 bytes)
train-labels-idx1-ubyte.gz: training set labels (28881 bytes)
t10k-images-idx3-ubyte.gz: test set images (1648877 bytes)
t10k-labels-idx1-ubyte.gz: test set labels (4542 bytes)
下载后得到以上四个文件,解压后得到的数据matlab无法直接读取这个格式,故写了一个matlab程序读取该数据。
demoMNIST.m - 主程序
%% MNIST数据库读取
%读取MNIST数据集中的图片
train_images = readMNISTImages('train-images-idx3-ubyte'); %60000个训练集,大小为28*28*60000
test_images = readMNISTImages('t10k-images-idx3-ubyte'); %10000个训练集,大小为28*28*10000
%读取MNIST数据集中的标签
train_labels1 = readMNISTLabels('train-labels-idx1-ubyte');%标签0~9;60000个标签,大小为60000*1
test_labels1 = readMNIS