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

Class ToTensor

mogen/datasets/pipelines/formatting.py:35–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected