ToFixedDims
- class hybrid_learning.datasets.transforms.image_transforms.ToFixedDims(dims)[source]
Bases:
ImageTransformSqueeze or unsqueeze a tensor to obtain specified number of dimensions.
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)Squeezing or unsqueezing.
Inherited from : py: class:ImageTransform
apply_to(img)Squeezing or unsqueezing.
Inherited from : py: class:Transform
apply_to(img)Squeezing or unsqueezing.
Special Methods:
__init__(dims)Inherited from : py: class:ImageTransform
__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.
- Parameters
dims (int) –