MCPcopy Create free account
hub / github.com/OpenImagingLab/4DSloMo / build_scaling_rotation

Function build_scaling_rotation

utils/general_utils.py:102–111  ·  view source on GitHub ↗
(s, r)

Source from the content-addressed store, hash-verified

100 return R
101
102def build_scaling_rotation(s, r):
103 L = torch.zeros((s.shape[0], 3, 3), dtype=torch.float, device="cuda")
104 R = build_rotation(r)
105
106 L[:,0,0] = s[:,0]
107 L[:,1,1] = s[:,1]
108 L[:,2,2] = s[:,2]
109
110 L = L @ R
111 return L
112
113def build_rotation_4d(l, r):
114 l_norm = torch.norm(l, dim=-1, keepdim=True)

Calls 1

build_rotationFunction · 0.85

Tested by

no test coverage detected