Info
This question is closed. Reopen it to edit or answer.
sequence to sequence classification output sequence is to small and have the same size
1 view (last 30 days)
Show older comments
Hi,
inputSize = [86 5 1];
filterSize = 3;
numFilters = 5;
numHiddenUnits = 256;
numClasses = 27;
maxEpochs=20;
% Netzoptionen
options = trainingOptions('adam', ...
'ExecutionEnvironment','gpu', ...
'GradientThresholdMethod','l2norm', ...
'Shuffle','never', ...
'MaxEpochs',maxEpochs, ...
'MiniBatchSize',1000, ...
'GradientThreshold',1, ...
'InitialLearnRate',0.01, ...
'SequenceLength','longest', ...
'Verbose',false, ...
'Plots','training-progress', ...
'LearnRateSchedule','none', ...
'LearnRateDropFactor',0.01, ...
'LearnRateDropPeriod',10);
layers = [ ...
sequenceInputLayer(inputSize,'Name','input')
sequenceFoldingLayer('Name','fold')
convolution2dLayer(filterSize,numFilters,'Name','conv')
batchNormalizationLayer('Name','bn')
reluLayer('Name','relu')
sequenceUnfoldingLayer('Name','unfold')
flattenLayer('Name','flatten')
bilstmLayer(numHiddenUnits,'OutputMode','sequence','Name','lstm')
bilstmLayer(numHiddenUnits,'OutputMode','sequence','Name','lstm2')
fullyConnectedLayer(numClasses, 'Name','fc')
softmaxLayer('Name','softmax')
classificationLayer('Name','classification')];
I have the network with these settings Trained with image sequences and categorical labels with the same sequence length. No errors! When classifying to test with the same sequences, unfortunately, I always get 1 × 5 categorical array, no matter how big the sequences are.
But I want that the output sequence has the same size as the input
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!