Regression is not supported for networks with LSTM layers

2 views (last 30 days)
when setting up a network with LSTM (as in the example below), Matlab gives an error about using regression with LSTM.
1) Matlab has some nice support (finally) for regression output, as described in https://www.mathworks.com/help/nnet/ug/define-regression-output-layer.html is there some workaround that allows defining a regression loss function for LSTM (but is not built in yet)?
2) Why is this even an issue? LSTMs can easily be applied for regression given a MSE loss. It would be nice if there was some way to incorporate, but I'm not sure how. I think it will benefit the community.
Thanks!
------------------- load JapaneseVowelsTrain inputSize = 12; outputSize = 100; %Number of hidden. outputMode = 'last'; numClasses = 9; layers = [ sequenceInputLayer(inputSize) lstmLayer(outputSize,'OutputMode',outputMode) fullyConnectedLayer(numClasses) softmaxLayer regressionLayer] maxEpochs = 150; miniBatchSize = 27; options = trainingOptions('sgdm', ... 'MaxEpochs',maxEpochs, ... 'MiniBatchSize',miniBatchSize); %% net = trainNetwork(X,Y,layers,options);
-------------------------
  4 Comments
Sofía
Sofía on 23 Apr 2018
I'm working with the 2018a version, and it's still a problem...

Sign in to comment.

Answers (0)

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!