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

Method test_device

tests/python/pruning.py:69–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

67 )
68
69 def test_device(self):
70 in_channels = 2
71 coords, feats, labels = data_loader(in_channels, batch_size=1)
72 feats = feats.double()
73 feats.requires_grad_()
74 input = SparseTensor(feats, coords, device="cuda")
75 use_feat = torch.rand(feats.size(0)) < 0.5
76 pruning = MinkowskiPruning()
77 output = pruning(input, use_feat.cuda())
78 print(input)
79 print(use_feat)
80 print(output)
81
82 def test_empty(self):
83 in_channels = 2

Callers

nothing calls this directly

Calls 9

data_loaderFunction · 0.90
SparseTensorClass · 0.90
MinkowskiPruningClass · 0.90
gradcheckFunction · 0.90
doubleMethod · 0.80
requires_grad_Method · 0.80
deviceMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected