- 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.
推薦閱讀
- 玩轉(zhuǎn)智能機(jī)器人程小奔
- 網(wǎng)絡(luò)服務(wù)器架設(shè)(Windows Server+Linux Server)
- 數(shù)據(jù)運(yùn)營(yíng)之路:掘金數(shù)據(jù)化時(shí)代
- Visual C# 2008開發(fā)技術(shù)實(shí)例詳解
- 機(jī)艙監(jiān)測(cè)與主機(jī)遙控
- VMware Performance and Capacity Management(Second Edition)
- Visual Basic從初學(xué)到精通
- VB語言程序設(shè)計(jì)
- Hadoop Real-World Solutions Cookbook(Second Edition)
- Windows內(nèi)核原理與實(shí)現(xiàn)
- 大數(shù)據(jù)技術(shù)與應(yīng)用
- INSTANT Autodesk Revit 2013 Customization with .NET How-to
- RedHat Linux用戶基礎(chǔ)
- Dreamweaver CS6精彩網(wǎng)頁制作與網(wǎng)站建設(shè)
- 數(shù)字多媒體技術(shù)基礎(chǔ)