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

Function conv1x1

src/shape_assembly/models/encoder/vn_layers.py:12–20  ·  view source on GitHub ↗
(in_channels, out_channels, dim)

Source from the content-addressed store, hash-verified

10EPS = 1e-6
11
12def conv1x1(in_channels, out_channels, dim):
13 if dim == 3:
14 return nn.Conv1d(in_channels, out_channels, 1, bias=False)
15 elif dim == 4:
16 return nn.Conv2d(in_channels, out_channels, 1, bias=False)
17 elif dim == 5:
18 return nn.Conv3d(in_channels, out_channels, 1, bias=False)
19 else:
20 raise NotImplementedError(f'{dim}D 1x1 Conv is not supported')
21
22
23class VNLinear(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected