필터 지우기
필터 지우기

using LSTM nets for classification with multiple outputs

조회 수: 4 (최근 30일)
Giuseppe Menga
Giuseppe Menga 2023년 12월 11일
댓글: Giuseppe Menga 2023년 12월 12일
I'm using LSTM nets for classification.
I would like to have 3 outputs of 3 values (-1 0 +1)
Apparently the Matlab framework for that nets accepts only one output. In this case it should have 27 values (3^3), but it adds complications.
Any suggestion?
Giuseppe Menga

답변 (1개)

Shreeya
Shreeya 2023년 12월 12일
To build an LSTM based neural netowkr with three prediction classes, create a layer array containing a sequence input layer, an LSTM layer, a fully connected layer, a softmax layer, and a classification output layer. Further, set the size of the sequence input layer to the number of features of the input data and the size of the fully connected layer to the number of prediction classes classes.
Refer to the link below for more details:
  댓글 수: 1
Giuseppe Menga
Giuseppe Menga 2023년 12월 12일
Thanks for the answer, I saw the link you indicated.
I didn't understain the difference between the two examples of classification:
To create an LSTM network for sequence-to-label classification
lstmLayer(numHiddenUnits,'OutputMode','last')
To create an LSTM network for sequence-to-sequence classification
lstmLayer(numHiddenUnits,'OutputMode','sequence').
I used sequence-to-label classification, but to apply the classification in real time I will test the other.
But you didn't answer to my basic question:
using three outputs, each with three levels of classification, or transforming them in only one output with twentyseven levels of classiicaton.
I suspect that I have to transform the problem with only one output with twentyseven levels, as I haven't found any other example.
Have you some observation?
Giuseppe

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

카테고리

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

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by