MCPcopy Create free account
hub / github.com/TEA-Lab/TwoByTwo / bgs

Function bgs

src/shape_assembly/utils.py:37–43  ·  view source on GitHub ↗
(d6s)

Source from the content-addressed store, hash-verified

35 return np.mean(theta)
36
37def bgs(d6s):
38 bsz = d6s.shape[0]
39 b1 = F.normalize(d6s[:, :, 0], p=2, dim=1)
40 a2 = d6s[:, :, 1]
41 b2 = F.normalize(a2 - torch.bmm(b1.view(bsz, 1, -1), a2.view(bsz, -1, 1)).view(bsz, 1) * b1, p=2, dim=1)
42 b3 = torch.cross(b1, b2, dim=1)
43 return torch.stack([b1, b2, b3], dim=1).permute(0, 2, 1)
44
45
46def bgdR(Rgts, Rps):

Callers 3

get_6d_rot_lossFunction · 0.70
get_6d_rot_loss_symmetryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected