How to design LSTM-CNN on deep network designer?

조회 수: 23 (최근 30일)
NurAlisa Ali
NurAlisa Ali 2021년 3월 7일
답변: H W 2022년 11월 5일
Hello,
My project is on classification of ECG/EEG signals using deep learning. I have design based on sequence on LSTM layer. Now i want to design hybrid LSTM-CNN on deep network designer which i have problem with connection between LSTM and Convolutional layer. I used Sequencefolding layer (suggested by deep network designer) after LSTM and connect to Convolutionallayer2d. The problem is Sequencefolding layer have two output (1. output, 2. minibatchsize) , which i don't now where to connect this minibatchsize connection. Can somebody expert give me advice on this? Really appreciate on any advice.
Thanks in advance sir.

채택된 답변

Divya Gaddipati
Divya Gaddipati 2021년 3월 10일
You have to use a sequenceUnfoldingLayer that takes two inputs, feature map and the miniBatchSize from the corresponding sequenceLayer. You can refer to this example for more information.
  댓글 수: 1
NurAlisa Ali
NurAlisa Ali 2021년 4월 29일
Thank you very much for this sir. From the example given, it is for hybrid CNN-LSTM, what i'm try to design is LSTM-CNN....

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Dreaman
Dreaman 2021년 3월 28일
i have the same problem too, have u solved this problem?
  댓글 수: 2
NurAlisa Ali
NurAlisa Ali 2021년 4월 29일
Yeah i have try CNN-LSTM, but the input length must be not too long, otherwise will get out of memory even 32GB ram.
Manoj Devaraju
Manoj Devaraju 2022년 6월 9일
Hello Ali,
Evn I would like to apply CNN-LSTM network for the image data set classification problem. But unfortunately i am struggling to apply, can you please give me some insight, how can it be done?

댓글을 달려면 로그인하십시오.


H W
H W 2022년 11월 5일
% Load data
[XTrain,YTrain] = japaneseVowelsTrainData;
% Define layers
layers = [ sequenceInputLayer(12,'Normalization','none', 'MinLength', 9);
convolution1dLayer(3, 16)
batchNormalizationLayer()
reluLayer()
maxPooling1dLayer(2)
convolution1dLayer(5, 32)
batchNormalizationLayer()
reluLayer()
averagePooling1dLayer(2)
lstmLayer(100, 'OutputMode', 'last')
fullyConnectedLayer(9)
softmaxLayer()
classificationLayer()];
options = trainingOptions('adam', ...
'MaxEpochs',10, ...
'MiniBatchSize',27, ...
'SequenceLength','longest');
% Train network
net = trainNetwork(XTrain,YTrain,layers,options);

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by