CIFAR10 数据集介绍
CIFAR10数据集与MNIST都是入门级数据集, 该数据集共有60000张彩色图像,这些图像是32*32,分为10个类,每类6000张图。 这里面有50000张用于训练,构成了5个训练批,每一批10000张图;另外10000用于测试
数据加载
import tensorflow as tf
from keras.datasets import cifar10
import matplotlib.pyplot as plt
from keras.utils import to_categorical
(x_train, y_train), (x_test, y_test) = cifar10.load_data()
print(type(x_train))
print(x_train.size)
print(x_train.shape)
print(x_train[0,:,:,0])
print(x_test.shape)
print(y_train)
<class 'numpy.ndarray'>
153600000
(50000, 32,