MCPcopy Create free account
hub / github.com/MotrixLab/MotionDiffuse / qnormalize

Function qnormalize

text2motion/utils/quaternion.py:28–30  ·  view source on GitHub ↗
(q)

Source from the content-addressed store, hash-verified

26
27
28def qnormalize(q):
29 assert q.shape[-1] == 4, 'q must be a tensor of shape (*, 4)'
30 return q / torch.norm(q, dim=-1, keepdim=True)
31
32
33def qmul(q, r):

Callers 3

qpowFunction · 0.85
qslerpFunction · 0.85
qbetweenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected