- 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 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Sai Pavan
2023-9-22
编辑:Sai Pavan
2023-9-27
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Classification Ensembles 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!