MCPcopy Create free account
hub / github.com/TeleHuman/PBHC / normalize

Function normalize

humanoidverse/utils/torch_utils.py:46–47  ·  view source on GitHub ↗
(x, eps: float = 1e-9)

Source from the content-addressed store, hash-verified

44
45@torch.jit.script
46def normalize(x, eps: float = 1e-9):
47 return x / x.norm(p=2, dim=-1).clamp(min=eps, max=None).unsqueeze(-1)
48
49
50@torch.jit.script

Callers 4

quat_apply_yawFunction · 0.90
quat_unitFunction · 0.70
quat_from_angle_axisFunction · 0.70
yaw_quatFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected