How to create Multiple Output Neural Networks
6 views (last 30 days)
Show older comments
Emilio Lemonaris
on 15 Apr 2017
Answered: amirhossein boniadi
on 3 Aug 2020
Hi,
I am using the custom neural network maker network () to create my own architecture. However, I want multiple outputs to come from one layer (the last layer) but I am only able to make one output from the net. Is there anyway to do this?
I dont want to make a new network for each layer.
Kind regards,
E
0 Comments
Accepted Answer
Greg Heath
on 16 Apr 2017
Edited: Greg Heath
on 19 Apr 2017
It is very simple:
For N I-dimensional "I"nputs paired with N O-dimensional "O"utput targets
[ I N ] = size(inputmatrix)
[ O N ] = size(targetmatrix)
Hope this helps.
Thank you for formally accepting my answer
Greg
4 Comments
Emma Reeves
on 26 Apr 2017
Edited: Emma Reeves
on 26 Apr 2017
Greg,
Is it possible to set up a structure where
[I N1] = size(inputmatrix);
[O N2] = size(outputmatrix);
N1 /= N2?
I know that other programs such as TensorFlow can do it. I don't understand why the second dimension needs to match.
Greg Heath
on 27 Apr 2017
NO!
EACH of the N O-dimensional "O"utput target column vectors is the desired output for ONE of the N I-dimensional "I"nput column vectors.
Why?
Because that is the MATLAB NN convention regardless if it's pattern-recognition/classification or curve-fitting/regression.
EXAMPLE: For two-class classification, the targets are either [1 0 ]' or [0 1 ]'. However, if you have 60 inputs from class 1 and 40 from class 2, you still need 100 target columns.
Hope this helps.
Greg
More Answers (1)
amirhossein boniadi
on 3 Aug 2020
Hi;
I want to find out the algoritm used to coding 8 bit digital input to 8 bit digital out put can i find it by using neural networks in matlab? and can any one give me a brief instruction...
thanks...
0 Comments
See Also
Categories
Find more on Deep Learning Toolbox 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!