- If the 'OutputMode' is set to 'sequence', the output size of the lstmLayer will be a sequence of outputs with a size of [sequenceLength, numHiddenUnits].
- If the 'OutputMode' is set to 'last', the output size will be [1, numHiddenUnits].
- It's important to note that the output of the lstmLayer is typically followed by other layers in the network, such as fully connected layers or convolutional layers, which can further modify the size and shape of the output. Please refer the following link to learn more about LSTM: https://www.mathworks.com/help/deeplearning/ref/nnet.cnn.layer.lstmlayer.html
Is it so that output size of the lstmLayer is equal to the number of hidden units used in the lstmLayer?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
If i use a CNN-LSTM model, is it so that output size of the lstmLayer is equal to the number of hidden units used in the lstmLayer?
0 comentarios
Respuestas (1)
Sai Pavan
el 22 de Sept. de 2023
Editada: Sai Pavan
el 27 de Sept. de 2023
Hi Debojit,
I understand that you are trying to know whether the output size of the lstmlayer is equal to the number of hidden units of a lstmLayer in a CNN-LSTM model.
No, the output size of the lstmLayer in a CNN-LSTM model in MATLAB is not necessarily equal to the number of hidden units used in the layer.
In a CNN-LSTM model, the lstmLayer is typically used as a recurrent layer to process sequential data. The output size of the lstmLayer depends on the configuration of the layer and the specific problem you are working on. The lstmLayer in MATLAB has a couple of options that can affect the output size, such as the number of hidden units (numHiddenUnits) and the output mode ('sequence' or 'last').
Therefore, the output size of the lstmLayer in a CNN-LSTM model depends on the specific configuration and the subsequent layers in the network and not necessarily have to be equal to the number of hidden units in lstmlayer.
Hope this answers your question.
0 comentarios
Ver también
Categorías
Más información sobre Classification Ensembles en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!