How can we dynamically and stereoscopically show the process of convolution of samples by a convolutional neural network?
15 ビュー (過去 30 日間)
古いコメントを表示
layers0 = [ ...
imageInputLayer([size(input{1},1) size(input{1},2) size(input{1},3)],'Name','input1')
convolution2dLayer([3,3],10,'Padding','same') % 卷积核大小为3*1 生成16个卷积
batchNormalizationLayer % 批归一化层
reluLayer %relu激活函数
maxPooling2dLayer([2,2],'Stride',2,"Name", "pool1")% 2x1 kernel stride=2
dropoutLayer(0.2)
convolution2dLayer([5,5], 24, 'Padding', 'same')
batchNormalizationLayer
reluLayer
maxPooling2dLayer([2 1],'Stride',2,"Name", "pool2")% 2x1 kernel stride=2
dropoutLayer(0.1)
fullyConnectedLayer(64,'name','fullconnect1')
dropoutLayer(0.1)
fullyConnectedLayer(32,'name','fullconnect2')
dropoutLayer(0.1)
fullyConnectedLayer(numClasses,'name','fullconnect3') % 全连接层设置(影响输出维度)(cell层出来的输出层) %
softmaxLayer('Name','softmax')
classificationLayer('name','output')];
%% Set the hyper parameters for unet training
options0 = trainingOptions('sgdm', ... % 优化算法Adam
'MaxEpochs', 80, ... % 最大训练次数
'GradientThreshold', 1, ... % 梯度阈值
'InitialLearnRate', 0.001, ... % 初始学习率
'LearnRateDropFactor',0.01, ... % 学习率调整因子
'L2Regularization', 0.0001, ... % 正则化参数
'ExecutionEnvironment', 'gpu',... % 训练环境
'Verbose', 1, ... % 关闭优化过程
'Plots', 'none'); % 画出曲线
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Data Workflows についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!