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

Method forward

src/shape_assembly/models/encoder/vn_layers.py:67–77  ·  view source on GitHub ↗

x: point features of shape [B, N_feat, 3, N_samples, ...]

(self, x)

Source from the content-addressed store, hash-verified

65 self.negative_slope = negative_slope
66
67 def forward(self, x):
68 '''
69 x: point features of shape [B, N_feat, 3, N_samples, ...]
70 '''
71 d = self.map_to_dir(x.transpose(1, -1)).transpose(1, -1)
72 dotprod = (x * d)
73 mask = (dotprod >= 0).float()
74 d_norm_sq = (d * d)
75 x_out = self.negative_slope * x + (1 - self.negative_slope) * (
76 mask * x + (1 - mask) * (x - (d / (d_norm_sq + EPS)) * d))
77 return x_out
78
79
80class VNLinearLeakyReLU(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected