- 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)
推薦閱讀
- 數(shù)據(jù)浪潮
- 計(jì)算機(jī)信息技術(shù)基礎(chǔ)實(shí)驗(yàn)與習(xí)題
- 卷積神經(jīng)網(wǎng)絡(luò)的Python實(shí)現(xiàn)
- 大數(shù)據(jù)可視化
- 工業(yè)大數(shù)據(jù)分析算法實(shí)戰(zhàn)
- 軟件成本度量國(guó)家標(biāo)準(zhǔn)實(shí)施指南:理論、方法與實(shí)踐
- Starling Game Development Essentials
- Proxmox VE超融合集群實(shí)踐真?zhèn)?/a>
- 信息學(xué)競(jìng)賽寶典:數(shù)據(jù)結(jié)構(gòu)基礎(chǔ)
- Construct 2 Game Development by Example
- Augmented Reality using Appcelerator Titanium Starter
- Unreal Engine Virtual Reality Quick Start Guide
- 機(jī)器學(xué)習(xí):實(shí)用案例解析
- Filecoin原理與實(shí)現(xiàn)
- 算力經(jīng)濟(jì):從超級(jí)計(jì)算到云計(jì)算