SequenceinputLayer and Convolution2dLayer

4 vues (au cours des 30 derniers jours)
Chris Basic
Chris Basic le 27 Mar 2020
I was told by the deep network designer that the SequenceinputLayer and Convolution2dLayer that these two layers are incompatible. I would like to know why and how I could have an input of a 1x29 double set up with a Convolution2dLayer and have two classifications.

Réponses (2)

Zhiyu WANG
Zhiyu WANG le 22 Juin 2022
It`s recommended to transform your data to formatted dlarray objects at first.
As for the dlarray object, you can refer to this:
"Convolution2dLayer" needs at least 2 "spatial" dimensions
"SequenceinputLayer " needs at least 1 "time" dimension

Katja Mogalle
Katja Mogalle le 22 Juin 2022
From what you write, Chris, my understanding is that you want to perform 1D convolutions on sequence data (e.g. time series). From R2021b onwards, you can do this via sequenceInputLayer combined with convolution1dLayer. For an example, see here: https://uk.mathworks.com/help/deeplearning/ug/sequence-classification-using-1-d-convolutions.html
If this is not what you're trying to do, could you please provide some more context about your problem and what your data dimensions mean? You can also include a screenshot from the network analysis (e.g. using analyzeNetwork or Deep Network Designer).
As Zhiyu WANG mentioned, a convolution2dLayer generally expects two dimensions to convolve over. Typically, these are two spatial dimensions. But from R2022a you can also convolve over a mix of dimensions (e.g. spatial and sequence dimensions).

Catégories

En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by