What should the Inputsize of a SequenceInputLayer be?
Ältere Kommentare anzeigen
The input data is time series data with one feature.
I want to enter it into a sequenceInputLayer as shown in the image below.
So the inputsize of sequenceInputLayer is 4, right?
If not, please let me know.
Thank you.

3 Kommentare
Ashutosh
am 16 Jun. 2023
I am assuming that what you mean is there are 4 features, with 1 label (the numbers outside the feature matrices) corresponding to each set of 4 features. That is, the label 0.4 for the feature set [[0]; [0.1]; [0.2]; [0.3]] Correct me if I understood you wrong.
If indeed it is 4 features with 1 label that you want to feed into a sequenceInputLayer, then according to the documentation you must provide the size as a scalar, i.e. 4.
If it doesn't work, maybe you can also try [4 1] if the network you are using expects an image format.
Angelo Yeo
am 16 Jun. 2023
현재 올려주신 자료만으로는 답변드리기 어려울 것 같습니다. 특히, 보여주시는 그림이 의미하는 바를 알기가 어렵습니다. 문제 상황을 재현할 수 있도록 예시 코드를 올려주실 수 있으실까요?
지은 김
am 16 Jun. 2023
Antworten (1)
Angelo Yeo
am 16 Jun. 2023
0 Stimmen
sequenceInputLayer 의 문서에 따르면 이 함수는 아래와 같은 syntax를 가집니다.
또한, InputSize에 대한 설명을 보시면 아래와 같이 설명되어 있는 것을 알 수 있습니다.
- For 1-D image sequence input, InputSize is vector of two elements [h c], where h is the image height and c is the number of channels of the image.
따라서, layer = sequenceInputLayer([4, 1])과 같이 입력해줌으로써 길이 4 짜리의 1채널 벡터를 입력으로 받는 sequence input layer를 생성할 수 있습니다.
더 자세한 사항은 아래의 문서에서 확인하여 주십시오.
https://www.mathworks.com/help/deeplearning/ref/nnet.cnn.layer.sequenceinputlayer.html
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!