- Practical Convolutional Neural Networks
- Mohit Sewak Md. Rezaul Karim Pradeep Pujari
- 146字
- 2021-06-24 18:58:51
Flattened data
We will use flattened data in this example, or a representation of MNIST images in one dimension rather than two can also be used. Thus, each 28 x 28 pixels number image will be represented as a 784 pixel 1 dimensional array.
By flattening the data, information about the 2D structure of the image is thrown; however, our data is simplified. With the help of this, all our training data can be contained in one array of shape (60,000, 784), wherein the first dimension represents the number of training images and the second depicts the number of pixels in each image. This kind of data is easy to analyze using a simple neural network, as follows:
# Retrieving the training and test data (X_train, y_train), (X_test, y_test) = mnist.load_data() print('X_train shape:', X_train.shape) print('X_test shape: ', X_test.shape) print('y_train shape:',y_train.shape) print('y_test shape: ', y_test.shape)
推薦閱讀
- Hands-On Machine Learning with Microsoft Excel 2019
- SQL查詢:從入門到實踐(第4版)
- 數據化網站運營深度剖析
- 大數據營銷:如何讓營銷更具吸引力
- 數據庫程序員面試筆試真題庫
- Starling Game Development Essentials
- Power BI商業數據分析完全自學教程
- Oracle PL/SQL實例精解(原書第5版)
- 重復數據刪除技術:面向大數據管理的縮減技術
- 大數據數學基礎(Python語言描述)
- 改變未來的九大算法
- Spring MVC Beginner’s Guide
- openGauss數據庫核心技術
- 實現領域驅動設計
- 數據庫原理與設計實驗教程(MySQL版)