trw.transforms.transforms
¶
Module Contents¶
Classes¶
Abstraction of a batch transform |
|
Helper function to apply a given transform function on features that satisfy a criteria |
Functions¶
|
Return True if the feature is a numpy or torch array dim >= dim |
|
Return list of feature names which is a numpy or torch array dim >= 4, typically all |
|
Return list of feature names which belong to a given set of names |
|
Return list of feature names which is |
Attributes¶
- class trw.transforms.transforms.Transform¶
Abstraction of a batch transform
- abstract __call__(self, batch: trw.basic_typing.Batch) trw.basic_typing.Batch ¶
- trw.transforms.transforms.CriteriaFn¶
- class trw.transforms.transforms.TransformBatchWithCriteria(criteria_fn: CriteriaFn, transform_fn: Callable[[Sequence[str], trw.basic_typing.Batch], trw.basic_typing.Batch])¶
Bases:
Transform
Helper function to apply a given transform function on features that satisfy a criteria
- __call__(self, batch: trw.basic_typing.Batch) trw.basic_typing.Batch ¶
- trw.transforms.transforms.criteria_is_array_n_or_above(batch: trw.basic_typing.Batch, dim: int) Sequence[str] ¶
Return True if the feature is a numpy or torch array dim >= dim
- trw.transforms.transforms.criteria_is_array_4_or_above(batch: trw.basic_typing.Batch) Sequence[str] ¶
Return list of feature names which is a numpy or torch array dim >= 4, typically all n-d images, n >= 2