how to include four hidden layers by taking away LSTM.

1 Ansicht (letzte 30 Tage)
jaah navi
jaah navi am 20 Jun. 2021
Kommentiert: jaah navi am 28 Jun. 2021
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.

Akzeptierte Antwort

Aparajith Raghuvir
Aparajith Raghuvir am 21 Jun. 2021
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 Kommentare
jaah navi
jaah navi am 22 Jun. 2021
Thanks. It works.
jaah navi
jaah navi am 28 Jun. 2021
Could you please help me how to add sine, cosine, tanh activation by replacing reLu layer for the above code.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Image Data Workflows finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by