Binarize
- class hybrid_learning.datasets.transforms.image_transforms.Binarize(threshold=0.5, val_low_class=0.0, val_high_class=1.0)[source]
Bases:
Threshold
Simple 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
settings
Settings to reproduce instance.
Inherited from : py: class:Transform
IDENTITY_CLASS
The identity class or classes for composition / addition.
settings
Settings to reproduce instance.
Public Methods:
Inherited from : py: class:Threshold
apply_to
(input_tensor)Binarize
input_tensor
according to the settings.Inherited from : py: class:ImageTransform
apply_to
(input_tensor)Binarize
input_tensor
according to the settings.Inherited from : py: class:Transform
apply_to
(input_tensor)Binarize
input_tensor
according 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
self
withother
.__radd__
(other)Return a flat composition of
other
andself
.__call__
(img)Application of transformation.