How to create Multiple Output Neural Networks

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

 Réponse acceptée

Greg Heath
Greg Heath le 16 Avr 2017
Modifié(e) : Greg Heath le 19 Avr 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 commentaires

Hi Greg, thank you for your reply.
I dont quite understand how i can implement this using the matlab function 'network' when the output variable is a read-only value, it cannot be assigned dimension.
E
Greg Heath
Greg Heath le 19 Avr 2017
The target matrix contains N columns of O-dimensional vectors with nonnegative unit sum components that can be interpreted as conditional (on the input) probabilities.
Each of the O-dimensions represent an output category.
Hope this helps.
Greg
Emma Reeves
Emma Reeves le 26 Avr 2017
Modifié(e) : Emma Reeves le 26 Avr 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
Greg Heath le 27 Avr 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

Connectez-vous pour commenter.

Plus de réponses (1)

amirhossein boniadi
amirhossein boniadi le 3 Août 2020

0 votes

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...

Catégories

En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by