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

How to do it...

Let's look at the code on how to load MNIST data into numpy arrays using the keras.datasets.mnist class:

from keras.datasets import mnist
(X_train, y_train), (X_test, y_test) = mnist.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 list shows the following dataset shape:

X_train shape: (60000, 28, 28)
y_train shape: (60000,)
X_test shape: (10000, 28, 28)
y_test shape: (10000,)

Next, let's look at how to load data from a .csv file.

主站蜘蛛池模板: 工布江达县| 墨竹工卡县| 泾源县| 景德镇市| 志丹县| 保定市| 合江县| 渑池县| 商丘市| 本溪市| 图片| 永登县| 荥阳市| 无锡市| 棋牌| 思茅市| 巩义市| 娄烦县| 衡山县| 纳雍县| 清水河县| 尼玛县| 观塘区| 集安市| 固镇县| 通江县| 伊金霍洛旗| 惠东县| 留坝县| 深泽县| 寻乌县| 昭觉县| 墨脱县| 景泰县| 高台县| 新乐市| 温宿县| 澄城县| 蒙山县| 东源县| 永顺县|