MCPcopy Create free account
hub / github.com/NVIDIA/MinkowskiEngine / conv

Function conv

examples/convolution.py:48–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46
47
48def conv():
49 in_channels, out_channels, D = 2, 3, 2
50 coords, feats, labels = data_loader(in_channels, batch_size=1)
51
52 # Convolution
53 input = ME.SparseTensor(feats=feats, coords=coords)
54 conv = ME.MinkowskiConvolution(
55 in_channels,
56 out_channels,
57 kernel_size=3,
58 stride=2,
59 has_bias=False,
60 dimension=D)
61
62 output = conv(input)
63
64 print('Input:')
65 print_sparse_tensor(input)
66
67 print('Output:')
68 print_sparse_tensor(output)
69
70 # Convolution transpose and generate new coordinates
71 strided_coords, tensor_stride = get_random_coords()
72
73 input = ME.SparseTensor(
74 feats=torch.rand(len(strided_coords), in_channels), #
75 coords=strided_coords,
76 tensor_stride=tensor_stride)
77 conv_tr = ME.MinkowskiConvolutionTranspose(
78 in_channels,
79 out_channels,
80 kernel_size=3,
81 stride=2,
82 has_bias=False,
83 dimension=D)
84 output = conv_tr(input)
85
86 print('\nInput:')
87 print_sparse_tensor(input)
88
89 print('Convolution Transpose Output:')
90 print_sparse_tensor(output)
91
92
93def conv_on_coords():

Callers 15

testMethod · 0.85
test_gpuMethod · 0.85
test_kernelmap_gpuMethod · 0.85
test_kernelmapMethod · 0.85
strided_conv.pyFile · 0.85
testMethod · 0.85
test_expansionMethod · 0.85
test_gpuMethod · 0.85
testMethod · 0.85
test_analyticMethod · 0.85
test_gpuMethod · 0.85
test_gpuMethod · 0.85

Calls 3

data_loaderFunction · 0.90
print_sparse_tensorFunction · 0.85
get_random_coordsFunction · 0.70

Tested by 15

test_gpuMethod · 0.68
test_kernelmap_gpuMethod · 0.68
test_kernelmapMethod · 0.68
test_expansionMethod · 0.68
test_gpuMethod · 0.68
test_analyticMethod · 0.68
test_gpuMethod · 0.68
test_gpuMethod · 0.68
test_analyticMethod · 0.68
test_analytic_oddMethod · 0.68
test_gpuMethod · 0.68
test_forwardMethod · 0.68