Skip to content

Instantly share code, notes, and snippets.

@bayerj
Created August 26, 2013 08:08
Show Gist options
  • Select an option

  • Save bayerj/6339083 to your computer and use it in GitHub Desktop.

Select an option

Save bayerj/6339083 to your computer and use it in GitHub Desktop.
dot = (target[:, :, 3:7] * prediction[:, :, 6:10]).sum(axis=2).dimshuffle(0, 1, 'x')
dot = T.clip(dot, -.99, .99)
angle_loss = T.arccos(dot)
return residuals ** 2 + c * angle_loss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment