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

 採用された回答

Greg Heath
Greg Heath 2017 年 4 月 16 日
編集済み: Greg Heath 2017 年 4 月 19 日

0 投票

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 件のコメント

Emilio Lemonaris
Emilio Lemonaris 2017 年 4 月 18 日
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 2017 年 4 月 19 日
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 2017 年 4 月 26 日
編集済み: Emma Reeves 2017 年 4 月 26 日
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 2017 年 4 月 27 日
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

サインインしてコメントする。

その他の回答 (1 件)

amirhossein boniadi
amirhossein boniadi 2020 年 8 月 3 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by