Compose
- class hybrid_learning.datasets.transforms.common.Compose(transforms)[source]
Bases:
TransformCompose several transforms by sequentially executing them.
Public Data Attributes:
Settings to reproduce the instance.
Inherited from : py: class:Transform
IDENTITY_CLASSThe identity class or classes for composition / addition.
Settings to reproduce the instance.
Public Methods:
append(trafo)Append transformation to the processing chain.
insert(i, trafo)Insert
trafoat indexiinto the processing chain.apply_to(*inps)Apply all transformations in order.
Inherited from : py: class:Transform
apply_to(*inps)Apply all transformations in order.
Special Methods:
__init__(transforms)__getitem__(i)Get item from transforms member.
__len__()Get length of transforms member.
Inherited from : py: class:Transform
__repr__()Return repr(self).
__eq__(other)Return self==value.
__copy__()Return a shallow copy of self using settings.
__add__(other)Return a flat composition of
selfwithother.__radd__(other)Return a flat composition of
otherandself.__call__(*inps)General call to the transformation.
- apply_to(*inps)[source]
Apply all transformations in order. Transformations are taken from
transforms.- Return type
- property settings
Settings to reproduce the instance.
- transforms: List[Callable]
List of tuple transformations to apply in order.