(self, in_channels, out_channels, kernel_size, stride=1, dilation=1, bias=True, indice_key=None)
| 5 | |
| 6 | class SparseConv3d(nn.Module): |
| 7 | def __init__(self, in_channels, out_channels, kernel_size, stride=1, dilation=1, bias=True, indice_key=None): |
| 8 | super(SparseConv3d, self).__init__() |
| 9 | if 'torchsparse' not in globals(): |
| 10 | import torchsparse |
| 11 | self.conv = torchsparse.nn.Conv3d(in_channels, out_channels, kernel_size, stride, 0, dilation, bias) |
| 12 | |
| 13 | def forward(self, x: SparseTensor) -> SparseTensor: |
| 14 | out = self.conv(x.data) |