Loss function in CNN

7 ビュー (過去 30 日間)
Andres Ramirez
Andres Ramirez 2019 年 8 月 9 日
コメント済み: abomad anam 2020 年 3 月 9 日
I am trying to define a custom classification output layer in which I am defining the cross entropy as an error function. To my error function I want to add a second function whose error depends on the input and output of two intermediate layers of the CNN, but I have no idea how to extract these two variables to include them in the error function.
Could someone please help me.
Thank you.
Greetings.
  1 件のコメント
abomad anam
abomad anam 2020 年 3 月 9 日
Hi Andres,
I am trying to define a similar network in which the entropy loss function should computed from the final layer and some intermediate layer as well. Actually, I couldnot define a coustom outputlayer that accept mutiple input!
I have explain the problem in this link:
Could you help me solve this issue?

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

回答 (1 件)

Matt J
Matt J 2019 年 8 月 9 日
I expect you might have to feed the hidden layer outputs forward, making them inputs/outputs of your custom output layer. That way, you can then treat the hidden layers just like any other output layer prediction variables.
Doing this would result in an imperfectly sequential network architecture. The following page on layerGraph objects shows how to take control of the architecture at this level.

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by