Neural network training function error modulo a number
7 次查看(过去 30 天)
显示 更早的评论
How can I tell neural network training function to compute the error modulo a number.? For example if my targets are angles in degrees and the desired is 359 but the predictor gave me 2 degrees, the error is large (359-2)^2. How can you tell neural network to treat 2 as 360-2, such that the error is now (359-358)^2?
0 个评论
回答(1 个)
Greg Heath
2018-4-10
The simplest function that makes perfect sense is the corresponding squared Euclidean distance between corresponding points on the unit circle.
Other than taking the square root to obtain linear distance, I see no reason to waste computation to use any other function of distance,
Hope this helps.
Thank you for formally accepting my answer
Greg
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!