ImageTransform
- class hybrid_learning.datasets.transforms.image_transforms.ImageTransform[source]
Bases:
Transform
Transformations that can be applied to images. Images should be given as
torch.Tensor
version of aPIL.Image.Image
instance. The transformation will iteratively descent into mappings and sequences to find tensor values to apply the transformation to (None
values 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_CLASS
The identity class or classes for composition / addition.
settings
Settings 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
self
withother
.__radd__
(other)Return a flat composition of
other
andself
.__call__
(img)Application of transformation.