lgraph = layerGraph();
tempLayers = [
sequenceInputLayer(1,"Name","sequence")
lstmLayer(128,"Name","lstm")];
lgraph = addLayers(lgraph,tempLayers);
tempLayers = [
imageInputLayer([32 32 1],"Name","imageinput")
convolution2dLayer([3 3],32,"Name","conv_1","Padding","same","Stride",[2 2])
reluLayer("Name","relu_1")
convolution2dLayer([3 3],32,"Name","conv_2","Padding","same","Stride",[2 2])
reluLayer("Name","relu_2")
globalAveragePooling2dLayer("Name","gapool")
flattenLayer("Name","flatten")];
lgraph = addLayers(lgraph,tempLayers);
tempLayers = [
concatenationLayer(2,2,"Name","concat")
softmaxLayer("Name","softmax")
classificationLayer("Name","classoutput")];
lgraph = addLayers(lgraph,tempLayers);
% 清理辅助变量
clear tempLayers;
lgraph = connectLayers(lgraph,"flatten","concat/in2");
lgraph = connectLayers(lgraph,"lstm","concat/in1");