Deep Learning Toolbox: Layer 'regressionoutput': Detected output layer. The network must not have output layers.
57 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
Sai Kiran
2023-3-9
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 个评论
Imrana
2024-1-23
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
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!