Does the input size of sequenceInputLayer have to be set 1?

조회 수: 4 (최근 30일)
Jack Xiao
Jack Xiao 2022년 4월 11일
답변: Zhiyu WANG 2022년 5월 25일
The network is as follows:
inputSize = 1;
embeddingDimension = 50;
numHiddenUnits = 80;
numWords = enc.NumWords;
numClasses = numel(categories(YTrain));
layers = [ ...
sequenceInputLayer(inputSize)
wordEmbeddingLayer(embeddingDimension,numWords)
lstmLayer(numHiddenUnits,'OutputMode','last')
fullyConnectedLayer(numClasses)
softmaxLayer
classificationLayer]
I only tried to change inputSize = 2, then the network can not be trained with the error:
Does the input size of sequenceInputLayer have to be set 1?

답변 (1개)

Zhiyu WANG
Zhiyu WANG 2022년 5월 25일
Becasue the input sequence data is a 1 by 10 double.It menas each time you take 1 token out of the sequence.

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by