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

Method __init__

src/shape_assembly/models/encoder/vn_layers.py:243–270  ·  view source on GitHub ↗
(
            self,
            in_channels,
            dim=4,
            share_nonlinearity=False,
            negative_slope=0.2,
            use_rmat=False,
    )

Source from the content-addressed store, hash-verified

241 """VN-Invariant layer."""
242
243 def __init__(
244 self,
245 in_channels,
246 dim=4,
247 share_nonlinearity=False,
248 negative_slope=0.2,
249 use_rmat=False,
250 ):
251 super().__init__()
252
253 self.dim = dim
254 self.use_rmat = use_rmat
255 self.vn1 = VNLinearBNLeakyReLU(
256 in_channels,
257 in_channels // 2,
258 dim=dim,
259 share_nonlinearity=share_nonlinearity,
260 negative_slope=negative_slope,
261 )
262 self.vn2 = VNLinearBNLeakyReLU(
263 in_channels // 2,
264 in_channels // 4,
265 dim=dim,
266 share_nonlinearity=share_nonlinearity,
267 negative_slope=negative_slope,
268 )
269 self.vn_lin = conv1x1(
270 in_channels // 4, 2 if self.use_rmat else 3, dim=dim)
271
272 def forward(self, x):
273 """

Callers

nothing calls this directly

Calls 3

VNLinearBNLeakyReLUClass · 0.85
conv1x1Function · 0.85
__init__Method · 0.45

Tested by

no test coverage detected