Why is the error thrown: Inputs to concatenations layer must have consistent formats.
이전 댓글 표시
lgraph = layerGraph();
tempLayers = imageInputLayer([90 90 3],"Name","imageinput_1");
lgraph = addLayers(lgraph,tempLayers);
tempLayers = imageInputLayer([90 90 3],"Name","imageinput_2");
lgraph = addLayers(lgraph,tempLayers);
tempLayers = imageInputLayer([90 90 3],"Name","imageinput_3");
lgraph = addLayers(lgraph,tempLayers);
tempLayers = [
depthConcatenationLayer(3,"Name","depthcat")
convolution2dLayer([3 3],32,"Name","conv_1","Padding","same")
batchNormalizationLayer("Name","batchnorm_1")
reluLayer("Name","relu_1")
maxPooling2dLayer([5 5],"Name","maxpool","Padding","same")
convolution2dLayer([3 3],32,"Name","conv_2","Padding","same")
batchNormalizationLayer("Name","batchnorm_2")
reluLayer("Name","relu_2")
fullyConnectedLayer(3,"Name","fc")];
lgraph = addLayers(lgraph,tempLayers);
tempLayers = [
sequenceInputLayer(1,"Name","sequence")
lstmLayer(128,"Name","lstm")
dropoutLayer(0.5,"Name","dropout")
fullyConnectedLayer(3,"Name","fc1")];
lgraph = addLayers(lgraph,tempLayers);
tempLayers = [
concatenationLayer(1,2,"Name","concat")
softmaxLayer("Name","softmax")
classificationLayer("Name","classoutput")];
lgraph = addLayers(lgraph,tempLayers);
% clean up helper variable
clear tempLayers;
lgraph = connectLayers(lgraph,"imageinput_1","depthcat/in1");
lgraph = connectLayers(lgraph,"imageinput_2","depthcat/in2");
lgraph = connectLayers(lgraph,"imageinput_3","depthcat/in3");
lgraph = connectLayers(lgraph,"fc","concat/in1");
lgraph = connectLayers(lgraph,"fc1","concat/in2");
plot(lgraph);

채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!