MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / _apply

Method _apply

PATH/core/data/transforms/seg_transforms_dev.py:281–292  ·  view source on GitHub ↗

Apply the transforms on the input. Args: x: input to apply the transform operations. meth (str): meth. Returns: x: after apply the transformation.

(self, x: _T, meth: str)

Source from the content-addressed store, hash-verified

279 self.transforms = tfms_flatten
280
281 def _apply(self, x: _T, meth: str) -> _T:
282 """
283 Apply the transforms on the input.
284 Args:
285 x: input to apply the transform operations.
286 meth (str): meth.
287 Returns:
288 x: after apply the transformation.
289 """
290 for t in self.transforms:
291 x = getattr(t, meth)(x)
292 return x
293
294 def __getattribute__(self, name: str):
295 # use __getattribute__ to win priority over any registered dtypes

Callers 1

__getattribute__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected