- 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.
推薦閱讀
- Mastering Spark for Data Science
- 工業(yè)機(jī)器人技術(shù)及應(yīng)用
- 工業(yè)機(jī)器人產(chǎn)品應(yīng)用實(shí)戰(zhàn)
- Java實(shí)用組件集
- 自動(dòng)控制原理
- 人工智能與人工生命
- 計(jì)算機(jī)系統(tǒng)結(jié)構(gòu)
- Spark大數(shù)據(jù)技術(shù)與應(yīng)用
- 數(shù)據(jù)通信與計(jì)算機(jī)網(wǎng)絡(luò)
- Dreamweaver CS6精彩網(wǎng)頁制作與網(wǎng)站建設(shè)
- 深度學(xué)習(xí)與目標(biāo)檢測
- 電腦故障排除與維護(hù)終極技巧金典
- 機(jī)器人制作入門(第4版)
- 項(xiàng)目實(shí)踐精解:C#核心技術(shù)應(yīng)用開發(fā)
- Kubernetes Design Patterns and Extensions