Neural network training function error modulo a number

조회 수: 7 (최근 30일)
Kostas Sarrigeorgidis
Kostas Sarrigeorgidis 2018년 4월 10일
댓글: Kostas Sarrigeorgidis 2018년 4월 10일
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?

답변 (1개)

Greg Heath
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
  댓글 수: 1
Kostas Sarrigeorgidis
Kostas Sarrigeorgidis 2018년 4월 10일
Are u saying instead of train on the angle (one output), train with cos(theta), sin(theta)? (2 outputs). If so, how do you tell the network to give answers on the unit circle?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by