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

Method __init__

src/shape_assembly/models/encoder/vn_layers.py:81–92  ·  view source on GitHub ↗
(self, in_channels, out_channels, dim=5, share_nonlinearity=False, negative_slope=0.2)

Source from the content-addressed store, hash-verified

79
80class VNLinearLeakyReLU(nn.Module):
81 def __init__(self, in_channels, out_channels, dim=5, share_nonlinearity=False, negative_slope=0.2):
82 super(VNLinearLeakyReLU, self).__init__()
83 self.dim = dim
84 self.negative_slope = negative_slope
85
86 self.map_to_feat = nn.Linear(in_channels, out_channels, bias=False)
87 self.batchnorm = VNBatchNorm(out_channels, dim=dim)
88
89 if share_nonlinearity == True:
90 self.map_to_dir = nn.Linear(in_channels, 1, bias=False)
91 else:
92 self.map_to_dir = nn.Linear(in_channels, out_channels, bias=False)
93
94 def forward(self, x):
95 '''

Callers

nothing calls this directly

Calls 2

VNBatchNormClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected