MCPcopy Create free account
hub / github.com/MotrixLab/insactor / ToTensor

Class ToTensor

diffplanner/datasets/pipelines/formatting.py:36–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35@PIPELINES.register_module()
36class ToTensor(object):
37
38 def __init__(self, keys):
39 self.keys = keys
40
41 def __call__(self, results):
42 for key in self.keys:
43 results[key] = to_tensor(results[key])
44 return results
45
46 def __repr__(self):
47 return self.__class__.__name__ + f'(keys={self.keys})'
48
49
50@PIPELINES.register_module()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected