MATLAB Answers

0

Modify loss function used in classification layer

Asked by Jennifer Voon on 26 Sep 2019
Latest activity Commented on by Kenta Itakura on 28 Sep 2019
The default loss function used in classification layer is the crossentrophy. How can I modify or change the loss function used in the classification layer?

  2 Comments

You will have to define EXACTLYwhat output you want for each class's input.
Greg
Thank Greg for replying.
I am aware of that, but I am not exactly sure how to ‘define’ the output. Is there any example code that shows how I can do that?
Thank you!

Sign in to comment.

1 Answer

Answer by Kenta Itakura on 28 Sep 2019
 Accepted Answer

Please refer to this document. This document shows an example to change the loss function into sum of squares error.
In my experience, changing the function into other is not easy, though it is technically possible.

  2 Comments

Sign in to comment.