Fix a bug of random quaternions (#2687)

fix a bug for random quaternions
This commit is contained in:
Zhuoyang Pan authored and GitHub committed 2023-12-18 17:52:14 -08:00
1 parent 626441e15e
commit f7a49563a0
1 file changed
+1 -1
+1 -1
View File
@@ -60,7 +60,7 @@ def random_quat_tensor(N):
torch.sqrt(1 - u) * torch.sin(2 * math.pi * v), torch.sqrt(1 - u) * torch.sin(2 * math.pi * v),
torch.sqrt(1 - u) * torch.cos(2 * math.pi * v), torch.sqrt(1 - u) * torch.cos(2 * math.pi * v),
torch.sqrt(u) * torch.sin(2 * math.pi * w), torch.sqrt(u) * torch.sin(2 * math.pi * w),
torch.sqrt(u) * torch.sin(2 * math.pi * w), torch.sqrt(u) * torch.cos(2 * math.pi * w),
], ],
dim=-1, dim=-1,
) )