MCPcopy Create free account
hub / github.com/ADLab-AutoDrive/BEVFusion / __init__

Method __init__

mmdet3d/ops/spconv/pool.py:23–45  ·  view source on GitHub ↗
(self,
                 ndim,
                 kernel_size,
                 stride=1,
                 padding=0,
                 dilation=1,
                 subm=False)

Source from the content-addressed store, hash-verified

21class SparseMaxPool(SparseModule):
22
23 def __init__(self,
24 ndim,
25 kernel_size,
26 stride=1,
27 padding=0,
28 dilation=1,
29 subm=False):
30 super(SparseMaxPool, self).__init__()
31 if not isinstance(kernel_size, (list, tuple)):
32 kernel_size = [kernel_size] * ndim
33 if not isinstance(stride, (list, tuple)):
34 stride = [stride] * ndim
35 if not isinstance(padding, (list, tuple)):
36 padding = [padding] * ndim
37 if not isinstance(dilation, (list, tuple)):
38 dilation = [dilation] * ndim
39
40 self.ndim = ndim
41 self.kernel_size = kernel_size
42 self.stride = stride
43 self.padding = padding
44 self.subm = subm
45 self.dilation = dilation
46
47 def forward(self, input):
48 assert isinstance(input, SparseConvTensor)

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected