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

Class Transpose

mogen/datasets/pipelines/formatting.py:50–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48
49@PIPELINES.register_module()
50class Transpose(object):
51
52 def __init__(self, keys, order):
53 self.keys = keys
54 self.order = order
55
56 def __call__(self, results):
57 for key in self.keys:
58 results[key] = results[key].transpose(self.order)
59 return results
60
61 def __repr__(self):
62 return self.__class__.__name__ + \
63 f'(keys={self.keys}, order={self.order})'
64
65
66@PIPELINES.register_module()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected