How to have multiple targets in a neural network?

Hello,
I have a question, if I had multiple outputs for a pattern recognition neural network (as in I have 3 different targets, one indicates size, one indicates direction, one indicates angles)(and I have 8 features and 86 samples for input), I want to train them at the same time using one neural network instead on training each target one by one, how would I do that? If I use the toolbox it allows the entry of only one target. Is there a simple way to do this? Doesn't matter if it is in code or toolbox.
Thank you. :)

 採用された回答

Greg Heath
Greg Heath 2014 年 11 月 29 日

0 投票

For N examples of O outputs corresponding to N examples of I inputs
[I N ] = size(input)
[O N ] = size(target)
However, patternnet was designed to represent classes using {0,1} unit target vectors. So, unless you have discrete classes, use regression with fitnet.
Hope this helps.
Thank you for formally accepting my answer
Greg

4 件のコメント

F S
F S 2016 年 12 月 2 日
Hi Greg
I have a follow up question to that:
how does fitnet handle a target with, say, 3 differnet parameters [3 N]? Does it calculate the targets the same as if it was training three independent nn's for each target-parameter, or does the output for one target-parameter influence the other two and vice versa?
is there a way to establish a relationship between the three target vlaues (such as sum(target)=1) that the neural network recognizes and uses as a constraint to the output values, or for that matter a way to apply a constraint to the output values directly?
Thank you for your answer, flo
xiaofeng liu
xiaofeng liu 2017 年 2 月 10 日
Hi, did you solve this question? I have the same doubt, hopefully you have known how to do it. Thank you so much!
Greg Heath
Greg Heath 2017 年 2 月 12 日
You mean calculate the outputs. The answer is no.
The weights can be configured in many different ways depending on weight initialization. In general, there is no obvious relationship between the 3 target weights and the 2 or 1 target weight... or if 1 or 2 targets are identically zero.
Hope this helps.
Greg
Royi Avital
Royi Avital 2017 年 3 月 24 日
I think one should understand that the Net Object is updated according to the data on the configuration phase before the train test using `configure(hNetModel, mX, mT)`.

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

その他の回答 (0 件)

カテゴリ

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

質問済み:

2014 年 11 月 27 日

コメント済み:

2017 年 3 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by