Binarize
- class hybrid_learning.datasets.transforms.image_transforms.Binarize(threshold=0.5, val_low_class=0.0, val_high_class=1.0)[source]
Bases:
ThresholdSimple class for binarizing tensors into high and low class values. This is an alias for
Threshold. See there for details.Public Data Attributes:
Inherited from : py: class:Threshold
settingsSettings to reproduce instance.
Inherited from : py: class:Transform
IDENTITY_CLASSThe identity class or classes for composition / addition.
settingsSettings to reproduce instance.
Public Methods:
Inherited from : py: class:Threshold
apply_to(input_tensor)Binarize
input_tensoraccording to the settings.Inherited from : py: class:ImageTransform
apply_to(input_tensor)Binarize
input_tensoraccording to the settings.Inherited from : py: class:Transform
apply_to(input_tensor)Binarize
input_tensoraccording to the settings.Special Methods:
Inherited from : py: class:Threshold
__init__([threshold, val_low_class, ...])Init.
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.