MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / __call__

Method __call__

util/formatting.py:50–56  ·  view source on GitHub ↗
(self, results)

Source from the content-addressed store, hash-verified

48 self.keys = keys
49
50 def __call__(self, results):
51 for key in self.keys:
52 img = results[key]
53 if len(img.shape) < 3:
54 img = np.expand_dims(img, -1)
55 results[key] = to_tensor(img.transpose(2, 0, 1))
56 return results
57
58 def __repr__(self):
59 return self.__class__.__name__ + f'(keys={self.keys})'

Callers

nothing calls this directly

Calls 1

to_tensorFunction · 0.70

Tested by

no test coverage detected