Sequence-to-Label Classification Using 1-D Convolutions
Mostra commenti meno recenti
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 Commento
James Z
il 16 Mag 2023
If this issue is not resolved yet, adding a classifier layer at the end may help.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Deep Learning Code Generation Fundamentals in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!