Sequence to Sequence Classification with Deep Learning CNN+LSTM

I was looking through the possible implementation of sequence classification using deep-learning.
There are pllenty of example of LSTM/BILSTM implementations
and 1D-Convolutional implementations of the problem.
My question is there is a way to combine the two solutions?
If for the first one the building of the net seems pretty immediate by stacking series of custom layers:
layers = [ ...
sequenceInputLayer(numFeatures)
lstmLayer(numHiddenUnits,'OutputMode','sequence')
fullyConnectedLayer(numClasses)
softmaxLayer
classificationLayer];
The convolution implementation seems indeed more complex, as it directly defines the various computational blocks.
Can i use a pre-defined convolution2Dlayer in the layers structure like in A) or do i have to go deeply in coding as described in B)?

 채택된 답변

Srivardhan Gadila
Srivardhan Gadila 2020년 3월 25일

0 개 추천

I think you can use the convolution2Dlayer with appropriate input arguments but make sure you use the sequenceFoldingLayer, sequenceUnfoldingLayer wherever necessary. Also refer to List of Deep Learning Layers.

댓글 수: 2

Thanks for the early response,
It indeed came with good news since i am actually trying to solve the problem using custom loop and dlarrays with not satisfying results. However it is not clear for me the need for sequenceFolding/UnfoldingLayer since i am working on accelerometry data and not images. As a first rude approach, starting from the convolutional block described in:
I would concatenate the convolutional2DLayer just after the sequenceInputLayer. Is there any implicit step that i lost in the workflow?

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2020년 3월 22일

댓글:

2020년 3월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by