custom loss function for DNN training
19 次查看(过去 30 天)
显示 更早的评论
how can i write a custom loss fucntion for DNN training. I want to try reconstruction loss
0 个评论
回答(2 个)
Shounak Mitra
2019-5-17
You can create custom layers and define custom loss functions for output layers.
The output layer uses two functions to compute the loss and the derivatives: forwardLoss and backwardLoss. The forwardLoss function computes the loss L. The backwardLoss function computes the derivatives of the loss with respect to the predictions.
For eg., to write a weighted cross entropy classification loss, try running this in the MATLAB command window
>> edit(fullfile(matlabroot,'examples','deeplearning_shared','main','weightedClassificationLayer.m'))
Hope this helps
1 个评论
Dinial Utami Nurul Qomariah
2020-1-27
you can use matlab 2019a version
and acces this site.
and this site.
I hope you it will help. :-)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Statistics and Machine Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!