(self, x: SparseTensor)
| 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) |
| 15 | new_shape = [x.shape[0], self.conv.out_channels] |
| 16 | out = SparseTensor(out, shape=torch.Size(new_shape), layout=x.layout if all(s == 1 for s in self.conv.stride) else None) |
| 17 | out._spatial_cache = x._spatial_cache |
| 18 | out._scale = tuple([s * stride for s, stride in zip(x._scale, self.conv.stride)]) |
| 19 | return out |
| 20 | |
| 21 | |
| 22 | class SparseInverseConv3d(nn.Module): |
nothing calls this directly
no test coverage detected