官术网_书友最值得收藏!

How to do it...

Let's look at how to load this dataset and print the shapes for X_train, y_train, X_test, and y_test. The CIFAR-100 dataset is available through the load_data() function in keras.datasets.cifar100.

The dataset is downloaded from https://www.cs.toronto.edu/~kriz/cifar-100-python.tar.gz; this is hidden in the following implementation:

from keras.datasets import cifar100
(X_train, y_train), (X_test, y_test) = cifar100.load_data()
print("X_train shape: " + str(X_train.shape))
print("y_train shape: " + str(y_train.shape))
print("X_test shape: " + str(X_test.shape))
print("y_test shape: " + str(y_test.shape))

The output of the preceding listing sizes is shown in the following snippet:

X_train shape: (50000, 32, 32, 3)
y_train shape: (50000, 1)
X_test shape: (10000, 32, 32, 3)
y_test shape: (10000, 1)
主站蜘蛛池模板: 古田县| 鄄城县| 孝昌县| 麦盖提县| 邓州市| 大新县| 鲁甸县| 金沙县| 黔西县| 永丰县| 沁阳市| 剑川县| 志丹县| 乌恰县| 麟游县| 偏关县| 景洪市| 贵溪市| 延边| 腾冲县| 武汉市| 太湖县| 岳普湖县| 西华县| 营山县| 酉阳| 彭州市| 南平市| 宾阳县| 南宁市| 德江县| 新源县| 朝阳县| 山东省| 乃东县| 尼勒克县| 嵊州市| 宁陵县| 嘉鱼县| 南昌市| 泗洪县|