(s, r)
| 100 | return R |
| 101 | |
| 102 | def 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 | |
| 113 | def build_rotation_4d(l, r): |
| 114 | l_norm = torch.norm(l, dim=-1, keepdim=True) |
no test coverage detected