Effacer les filtres
Effacer les filtres

convolutional neural network-lstm

8 vues (au cours des 30 derniers jours)
rarekind
rarekind le 12 Fév 2020
Commenté : rarekind le 6 Août 2022
Hello everyone
Any ane having code for convolutional neural network with lstm. i tried to incorporate cnn layers in LSTM but i colud not do it.
Thanks in advance

Réponses (1)

Jonathan
Jonathan le 4 Août 2022
inputSize = [28 28 1];
filterSize = 5;
numFilters = 20;
numHiddenUnits = 200;
numClasses = 10;
layers = [ ...
sequenceInputLayer(inputSize,'Name','input')
sequenceFoldingLayer('Name','fold')
convolution2dLayer(filterSize,numFilters,'Name','conv')
batchNormalizationLayer('Name','bn')
reluLayer('Name','relu')
sequenceUnfoldingLayer('Name','unfold')
flattenLayer('Name','flatten')
lstmLayer(numHiddenUnits,'OutputMode','last','Name','lstm')
fullyConnectedLayer(numClasses, 'Name','fc')
softmaxLayer('Name','softmax')
classificationLayer('Name','classification')];
lgraph = layerGraph(layers);
lgraph = connectLayers(lgraph,'fold/miniBatchSize','unfold/miniBatchSize');
  1 commentaire
rarekind
rarekind le 6 Août 2022
thankyou

Connectez-vous pour commenter.

Catégories

En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by