SequenceinputLayer and Convolution2dLayer

4 visualizaciones (últimos 30 días)
Chris Basic
Chris Basic el 27 de Mzo. de 2020
Respondida: Katja Mogalle el 22 de Jun. de 2022
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.

Respuestas (2)

Zhiyu WANG
Zhiyu WANG el 22 de Jun. de 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 el 22 de Jun. de 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).

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by