wormpose.machine_learning.loss

Definition of the loss function for the network

wormpose.machine_learning.loss.angle_diff(a, b)[source]

Root Mean Square Error of the angle difference. The angle difference function takes into account the periodicity of angles

wormpose.machine_learning.loss.symmetric_angle_difference(y_true, y_pred)[source]

We calculate the angle difference between the prediction and the two possible labels, and pick the minimum of the two, we average the result on the batch