- 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.
推薦閱讀
- TIBCO Spotfire:A Comprehensive Primer(Second Edition)
- 微型計算機控制技術
- 機器學習與大數據技術
- STM32G4入門與電機控制實戰:基于X-CUBE-MCSDK的無刷直流電機與永磁同步電機控制實現
- Python Data Science Essentials
- Mastering Elastic Stack
- 現代機械運動控制技術
- 永磁同步電動機變頻調速系統及其控制(第2版)
- 網絡服務搭建、配置與管理大全(Linux版)
- 簡明學中文版Photoshop
- 計算智能算法及其生產調度應用
- 設計模式
- Practical AWS Networking
- DynamoDB Applied Design Patterns
- 中小型網站建設與管理