- 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)
推薦閱讀
- PyTorch深度學(xué)習(xí)實(shí)戰(zhàn):從新手小白到數(shù)據(jù)科學(xué)家
- 使用GitOps實(shí)現(xiàn)Kubernetes的持續(xù)部署:模式、流程及工具
- Redis應(yīng)用實(shí)例
- 數(shù)據(jù)驅(qū)動:從方法到實(shí)踐
- 達(dá)夢數(shù)據(jù)庫性能優(yōu)化
- 智能數(shù)據(jù)分析:入門、實(shí)戰(zhàn)與平臺構(gòu)建
- Hadoop 3.x大數(shù)據(jù)開發(fā)實(shí)戰(zhàn)
- 計(jì)算機(jī)應(yīng)用基礎(chǔ)教程上機(jī)指導(dǎo)與習(xí)題集(微課版)
- 重復(fù)數(shù)據(jù)刪除技術(shù):面向大數(shù)據(jù)管理的縮減技術(shù)
- IPython Interactive Computing and Visualization Cookbook(Second Edition)
- Solaris操作系統(tǒng)原理實(shí)驗(yàn)教程
- Internet of Things with Python
- 實(shí)現(xiàn)領(lǐng)域驅(qū)動設(shè)計(jì)
- 數(shù)據(jù)庫查詢優(yōu)化器的藝術(shù):原理解析與SQL性能優(yōu)化
- Kubernetes快速進(jìn)階與實(shí)戰(zhàn)