赞
踩
在上一篇博客中,讲解了怎么用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.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。