MCPcopy Create free account
hub / github.com/VCIP-RGBD/DFormer / angle_transform

Function angle_transform

models/encoders/DFormerv2.py:109–112  ·  view source on GitHub ↗
(x, sin, cos)

Source from the content-addressed store, hash-verified

107
108
109def angle_transform(x, sin, cos):
110 x1 = x[:, :, :, :, ::2]
111 x2 = x[:, :, :, :, 1::2]
112 return (x * cos) + (torch.stack([-x2, x1], dim=-1).flatten(-2) * sin)
113
114
115class GeoPriorGen(nn.Module):

Callers 2

forwardMethod · 0.85
forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected