(in_channels, out_channels, dim)
| 10 | EPS = 1e-6 |
| 11 | |
| 12 | def 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 | |
| 23 | class VNLinear(nn.Module): |