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

  • Keras Deep Learning Cookbook
  • Rajdeep Dua Manpreet Singh Ghotra
  • 92字
  • 2021-06-10 19:38:52

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.

主站蜘蛛池模板: 东至县| 射洪县| 定襄县| 治县。| 乐陵市| 安达市| 贡觉县| 余干县| 西宁市| 崇仁县| 高州市| 卓资县| 华蓥市| 大丰市| 井研县| 太保市| 景洪市| 和平区| 庄河市| 高安市| 江永县| 陕西省| 健康| 高密市| 莱州市| 蒙城县| 长丰县| 菏泽市| 横峰县| 林西县| 昌图县| 剑阁县| 儋州市| 望城县| 漳平市| 武清区| 连州市| 鄂托克旗| 讷河市| 塘沽区| 沈丘县|