当前位置:   article > 正文

手把手教你用matlab做深度学习(二)- --CNN_matlab 如何提高cnn 网络精度

matlab 如何提高cnn 网络精度

在上一篇博客中,讲解了怎么用matlab搭建CNN网络模型,并给出了训练过程与结果。但是结果不是很满意,大概训练精度在80%左右,现在给出改进方案。

1.首先,我们可以把CNN滤波输出数改大点,从原来的32改为numFilters = 128,完整的程序如下:

[trainingImages,trainingLabels,testImages,testLabels] = helperCIFAR10Data.load('cifar10Data');
numImageCategories = 10;
categories(trainingLabels)
[height, width, numChannels, ~] = size(trainingImages);

imageSize = [height width numChannels];
inputLayer = imageInputLayer(imageSize)
% Convolutional layer parameters
filterSize = [5 5];
numFilters = 128;


middleLayers = [
    
% The first convolutional layer has a bank of 32 5x5x3 filters. A
% symmetric padding of 2 pixels is added to ensure that image borders
% are included in the processing. This is important to avoid
% information at the borders being washed away too early in the
% network.

本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号