How to implement customised loss function in patternnet (pattern recognition neural network)?

2 次查看(过去 30 天)
I am trying to implement my own loss function in the second hidden layer for multiclass classification problem. can anyone tell me how to start with.
I am aware of how to increase the hidden layers but not about implementing lossfunction assisted hidden layer.
Thanks in advance
Raja

回答(1 个)

Mandar
Mandar 2023-1-23
I understand that you want to define custom loss function.
Refer to the following documentation link to know more about implementation of the custom loss function.
  1 个评论
RAJA SEKHAR BATTU
RAJA SEKHAR BATTU 2023-1-25
@Mandar Thank you for the answer
I am aware of this link. I am trying to implement a custom loss function
when I change the loss function from cross entropy to my custom loss function
Net.perFuncn='customloss'
Its not working but giving error not enough input arguements
Can you provide any example of custom loss function for classification using patternnet or feedforwardnet
many thanks
Raja

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Pattern Recognition and Classification 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by