(5.4.1)--5.4PracticalCase.pdf
《(5.4.1)--5.4PracticalCase.pdf》由会员分享,可在线阅读,更多相关《(5.4.1)--5.4PracticalCase.pdf(5页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、Introduction to Artificial Intelligence Image Classification with Multilayer Perceptron Nankai University Introduction to Artificial Intelligence Image classification is based on the semantic information of the image to distinguish different categories of images,which is an important basic problem i
2、n computer vision.This experiment uses a Multi-Layer Perceptron(MLP)model to predict handwritten digital pictures.1.Preparing data set 1.1 Data set description The MNIST data set contains 60,000 training sets and 10,000 test data sets.Divided into pictures and labels,the picture is a 28*28 pixel mat
3、rix,and the labels are 10 numbers from 0 to 9.1.2 Download and prepare the MINST dataset import tensorflow as tf import numpy as np(x_train,y_train),(x_test,y_test)=tf.keras.datasets.mnist.load_data()x_train=tf.keras.utils.normalize(x_train,axis=1)x_test=tf.keras.utils.normalize(x_test,axis=1)#Norma
4、lization x_train and x_test are used to obtain mnist training set and test set respectively.2.Create the MLP The following code is to define a simple MLP.There are three layers,two hidden Introduction to Artificial Intelligence layers with a size of 100 and an output layer with a size of 10.Because
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 5.4 PracticalCase
限制150内