ImageTransform
- class hybrid_learning.datasets.transforms.image_transforms.ImageTransform[source]
Bases:
TransformTransformations that can be applied to images. Images should be given as
torch.Tensorversion of aPIL.Image.Imageinstance. The transformation will iteratively descent into mappings and sequences to find tensor values to apply the transformation to (Nonevalues are left untouched). An error will be raised if values are found which are neither tensors norNone.Public Data Attributes:
Inherited from : py: class:Transform
IDENTITY_CLASSThe identity class or classes for composition / addition.
settingsSettings to reproduce the instance.
Public Methods:
apply_to(img)Application of transformation.
Inherited from : py: class:Transform
apply_to(img)Application of transformation.
Special Methods:
__call__(img)Application of transformation.
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__(img)Application of transformation.