Presentation is loading. Please wait.

Presentation is loading. Please wait.

Construct a Convolutional Neural Network with Python

Similar presentations


Presentation on theme: "Construct a Convolutional Neural Network with Python"— Presentation transcript:

1 Construct a Convolutional Neural Network with Python
Le Li

2 Abstract The structure of the CNN
The Parameters can be modified to adjust CNN Data Set : MNIST Baseline Model Result Comparison Shortcomings

3 A Three-layer Convolutional Neural Network
The Cnvolutional Neural Network has one convolutional layer, one pooling layer, one Fully Connected layer, and finally passes through the Softmax layer.

4 A Three-layer Convolutional Neural Network
Pooling Layer: The pooling size is 2*2 Pooling type: Max_pooling Mean_pooling Activation Function: Tanh:

5 Parameters You can adjust CNN attributes by changing the parameters
C_SIZE : The size of the convolution kernel MAX_ITER_NUM = The iteration number of training train_num = The number of images to be used in training set. Test_num = The numbers of images to be used in test set data_num = train_num + Test_num cLyNum = The number of convolution kernels fLyNum = Number of fully connected neurons

6 Data Set There are 10,000 images from MNIST in the data set. Using 8,000 images as training set and 2000 as test set. The image size is 28*28. Labels are stored separately in a text file in the folder.

7 Baseline Model: Support Vector Machine (sk.learn LinearSVC, C=0.1)
Cross Validation: Perform cross-validations with 8,000 images. Randomly select 80% of the images for training and 20% of the images for testing each time. Prediction: Using 2000 images of the data set for prediction and compute the accuracy.

8 Result Comparison The accuracy of prediction. CNN SVM(C=0.1)
8000 images for training and 2000 images for testing. CNN SVM(C=0.1) 20 training iterations 88% 90% 30 training iterations 92% CNN: 2*2 Mean-Pooling; 30 5*5 Convolution Kernels; Tanh activation function; 100 fully connected neurons

9 Shortcomings This self-built CNN has some shortcomings:
Only 3 layers: one convolutional layer, one pooling layer and one Fully Connected layer, If you want to add a new layer, you need to modify the code. The program runs very slowly. It runs more than 30 minutes for training with 1000 images in 20 iterations. The accuracy has only been around 0.9.

10 Thanks !


Download ppt "Construct a Convolutional Neural Network with Python"

Similar presentations


Ads by Google