Filter löschen
Filter löschen

Deep Learning Toolbox: Layer 'regressionoutput': Detected output layer. The network must not have output layers.

41 Ansichten (letzte 30 Tage)
Hello,
I am using the Deep Learning Toolbox with a predefined example from the documentation, for a regression problem:
numFeatures = 15;
numResponses = 10;
numHiddenUnits = 100;
layers = [
sequenceInputLayer(numFeatures)
lstmLayer(numHiddenUnits,OutputMode="last")
fullyConnectedLayer(numResponses)
regressionLayer];
dlnet = dlnetwork(layers);
I cannot find any cause for it and I didn't find any suggestions online regarding this. I just want to test a simple STFT layer with a vector inputs of a certain fixed length.
Error using dlnetwork/initialize
Invalid network.
Error in dlnetwork (line 218)
net = initialize(net, dlX{:});
Error in test_stft_layer (line 37)
dlnet = dlnetwork(layers);
Caused by:
Layer 'regressionoutput': Detected output layer. The network must not have output layers.

Akzeptierte Antwort

Sai Kiran
Sai Kiran am 9 Mär. 2023
Hi,
The regressionLayer is not supported in dlnetwork, you have to define custom loss function if you use the dlnetwork. Please refer to the following example on workflow for dlnetwork.
Please refer to the following example on how to implement regression using LSTM in MATLAB.
I hope it helps!
Thanks.
  2 Kommentare
Mircea Susca
Mircea Susca am 10 Mär. 2023
Thank you very much! I didn't know why it's not acceptable in this case; I'll investigate the indicated examples and adapt accordingly.
Imrana
Imrana am 23 Jan. 2024
I have a question here, how do we apply lstm network to irregular data. Are we able to use neuralODELayer but then it throws an error "invalid Network"?
Can you please help me out with any example?
Best Regards,
Imrana

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by