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

Function generate_input_sparse_tensor

tests/python/global.py:59–68  ·  view source on GitHub ↗
(file_name, voxel_size=0.05, batch_size=1)

Source from the content-addressed store, hash-verified

57
58
59def generate_input_sparse_tensor(file_name, voxel_size=0.05, batch_size=1):
60 # Create a batch, this process is done in a data loader during training in parallel.
61 batch = [
62 load_file(file_name, voxel_size),
63 ] * batch_size
64 coordinates_, featrues_, pcds = list(zip(*batch))
65 coordinates, features = ME.utils.sparse_collate(coordinates_, featrues_)
66
67 # Normalize features and create a sparse tensor
68 return features, coordinates
69
70
71if __name__ == '__main__':

Callers 1

global.pyFile · 0.70

Calls 1

load_fileFunction · 0.70

Tested by

no test coverage detected