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

Function data_loader

tests/python/common.py:57–78  ·  view source on GitHub ↗
(
    nchannel=3,
    max_label=5,
    is_classification=True,
    seed=-1,
    batch_size=2,
    dtype=torch.float32,
)

Source from the content-addressed store, hash-verified

55
56
57def data_loader(
58 nchannel=3,
59 max_label=5,
60 is_classification=True,
61 seed=-1,
62 batch_size=2,
63 dtype=torch.float32,
64):
65 if seed >= 0:
66 torch.manual_seed(seed)
67
68 data = [" X ", " X X ", " XXXXX "]
69
70 # Generate coordinates
71 coords = [get_coords(data) for i in range(batch_size)]
72 coords = ME.utils.batched_coordinates(coords)
73
74 # features and labels
75 N = len(coords)
76 feats = torch.arange(N * nchannel).view(N, nchannel).to(dtype)
77 label = (torch.rand(batch_size if is_classification else N) * max_label).long()
78 return coords, feats, label

Callers 15

testMethod · 0.90
test_gpuMethod · 0.90
testMethod · 0.90
test_force_creationMethod · 0.90
test_quantizationMethod · 0.90
test_quantization_gpuMethod · 0.90
test_operation_modeMethod · 0.90
test_kernelmap_gpuMethod · 0.90
test_kernelmapMethod · 0.90
testMethod · 0.90
test_gpuMethod · 0.90
testMethod · 0.90

Calls 1

get_coordsFunction · 0.85

Tested by 15

test_gpuMethod · 0.72
test_force_creationMethod · 0.72
test_quantizationMethod · 0.72
test_quantization_gpuMethod · 0.72
test_operation_modeMethod · 0.72
test_kernelmap_gpuMethod · 0.72
test_kernelmapMethod · 0.72
test_gpuMethod · 0.72
test_deviceMethod · 0.72
test_emptyMethod · 0.72
test_pruningMethod · 0.72
test_with_convtrMethod · 0.72