Compose
- class hybrid_learning.datasets.transforms.common.Compose(transforms)[source]
Bases:
Transform
Compose several transforms by sequentially executing them.
Public Data Attributes:
Settings to reproduce the instance.
Inherited from : py: class:Transform
IDENTITY_CLASS
The 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
trafo
at indexi
into 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
self
withother
.__radd__
(other)Return a flat composition of
other
andself
.__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.