MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / angle_diff_vec3

Function angle_diff_vec3

modeling/pi3/models/pi3_loss.py:36–37  ·  view source on GitHub ↗
(v1: torch.Tensor, v2: torch.Tensor, eps: float = 1e-12)

Source from the content-addressed store, hash-verified

34 return torch.where(err < beta, 0.5 * err.square() / beta, err - 0.5 * beta)
35
36def angle_diff_vec3(v1: torch.Tensor, v2: torch.Tensor, eps: float = 1e-12):
37 return torch.atan2(torch.cross(v1, v2, dim=-1).norm(dim=-1) + eps, (v1 * v2).sum(dim=-1))
38
39# ---------------------------------------------------------------------------
40# PointLoss: Scale-invariant Local Pointmap

Callers 1

noraml_lossMethod · 0.70

Calls 1

normMethod · 0.80

Tested by

no test coverage detected