Regarding GAN and its loss objective
조회 수: 1(최근 30일)
표시 이전 댓글
How to use 'mse' as loss function?
In the example provided, sigmoid is used. How to modify the function to make the loss objective as minimum mse.
댓글 수: 0
채택된 답변
Sourav Bairagya
2019년 12월 16일
You can use 'mse' function from Deep Learning Toolbox which calculates half mean sqaured error between given two inputs.
dlY = mse(dlX,targets);
Format for 'dlX' or 'targets' will be as follows: [height, width, no of channels, no of observations].
'dlX' and 'targets' can be of datatype dlarray or numeric array.
If you want to use whole mse loss, then multiply the output with 2, i.e.
dlY = 2*mse(dlX,targets);
For more information you can leverage this link:
댓글 수: 0
추가 답변(0개)
참고 항목
범주
Find more on Get Started with Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!