How to using multi output in Neural network fitting app?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
hi,
I want to develop a prediction model using Neural Network Fitting App in Matlab 2024a version.
I want to use two output data (A and B), but this app only produces one output.
Can't I use more than 2 outputs?
0 Kommentare
Akzeptierte Antwort
Angelo Yeo
am 4 Jun. 2024
For your reference, the doc below explains how to create shallow neural networks with multiple outputs.
num_input = 1;
num_output1=2;
num_output2=1;
num_neuron=16;
NN=network;
NN.numInputs=1;
NN.numLayers=3;
NN.biasConnect(1:end)=1;
NN.inputConnect(1,1)=1;
NN.layerConnect=[0 0 0;1 0 0;1 0 0];
NN.outputConnect=[0 1 1];
NN.layers{1}.transferFcn='poslin';
NN.layers{1}.size=num_neuron;
NN.layers{2}.transferFcn='poslin';
NN.layers{2}.size=num_output1;
NN.layers{3}.transferFcn='poslin';
NN.layers{3}.size=num_output2;
NN.initFcn='initlay';
NN.inputs{1}.size=num_input;
NN.trainFcn='trainlm';
actual_input=rand(num_input,10);
actual_output1=rand(num_output1,10);
actual_output2=rand(num_output2,10);
NN_initialized=configure(NN,actual_input,{actual_output1; actual_output2});
% view(NN_initialized)
As a final note, I still would like to recommend you use Deep Network Designer for a more "intuitive" designing.
3 Kommentare
Angelo Yeo
am 4 Jun. 2024
Well, my model already has one hidden layer with 16 neurons. What's between input layer and output layer can be thought of as hidden layers.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!