Question about creating a custom regression layer in matlab NN toolbox
2 views (last 30 days)
Show older comments
The information required to create a custom regression layer is given in the link https://www.mathworks.com/help/deeplearning/ug/define-custom-regression-output-layer.html. I have a question about the information given in this link, specifically in step 5 : create a backward loss function. The sample code given is
function dLdY = backwardLoss(layer, Y, T)
% Returns the derivatives of the MAE loss with respect to the predictions Y
R = size(Y,3);
N = size(Y,4);
dLdY = sign(Y-T)/(N*R);
end
Shoudn't there be a summation over the mini-batch size when computing dLdY? Or does the toolbox take care of it internally?
0 Comments
Answers (0)
See Also
Categories
Find more on Deep 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!