how to include four hidden layers by taking away LSTM.

조회 수: 1 (최근 30일)
jaah navi
jaah navi 2021년 6월 20일
댓글: jaah navi 2021년 6월 28일
I am having a code that implements LSTM layer as below:
inputSize = 12;
numHiddenUnits1 = 48;
numHiddenUnits2 = 48;
numHiddenUnits3 = 48;
numHiddenUnits4 = 48;
numClasses = 12;
layers = [ ...
sequenceInputLayer(inputSize)
lstmLayer(numHiddenUnits1,'OutputMode','sequence')
lstmLayer(numHiddenUnits2,'OutputMode','sequence')
lstmLayer(numHiddenUnits3,'OutputMode','sequence')
lstmLayer(numHiddenUnits4,'OutputMode','sequence')
fullyConnectedLayer(numClasses)
reluLayer
regressionLayer]
Now I want to implement four hidden layers without LSTM. So anyone can help me how to modify it.

채택된 답변

Aparajith Raghuvir
Aparajith Raghuvir 2021년 6월 21일
I understand you would like to add 4 fully connected hidden layers without LSTM.
The same fullyConnectedLayer() function can be used with your choice of hyperparemeters to achieve your aim. Please refer to this for the documentation of the abovementioned function.
I hope this helps.
  댓글 수: 4
jaah navi
jaah navi 2021년 6월 22일
Thanks. It works.
jaah navi
jaah navi 2021년 6월 28일
Could you please help me how to add sine, cosine, tanh activation by replacing reLu layer for the above code.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by