Sequence-to-Label Classification Using 1-D Convolutions
이전 댓글 표시
I'm trying to build a Time Convolutional Network for sequence classification which can perform the same task of an LSTM network with 'output mode' equal to 'last'. In fact, all the time points of a sequence have the same label and different sequences may have different labels.
How can I modify the code proposed for Sequence-to-Sequence Classification Using 1-D Convolutions (https://www.mathworks.com/help/deeplearning/ug/sequence-to-sequence-classification-using-1-d-convolutions.html) in order to perform a sequence-to-one task?
When using a LSTM network with 'output mode' equal to 'last' the lstm layer returns the hidden state vector of the last time step only and provides it to the fully connected layer.
I guess I have to work on the output of the convolution operation (using the function dlconv) of the last convolutional layer before the fully connected layer. Suppose to apply the convolutional operation to a batch of 6 observations and the length of each sequence is equal to 1440 and the number of features is 20. The output of the convolutional operation (dlconv) is a dlarray of size NumFilters × 6 ×1440.
However, I don't know how to collapse time dimension of the output of the convolutional operation to only value. Is the same for LSTM networks, I mean I have to consider the output of the last time step only?
Thank you in advance
댓글 수: 1
James Z
2023년 5월 16일
If this issue is not resolved yet, adding a classifier layer at the end may help.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Deep Learning Code Generation Fundamentals에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!