PackMask
- class hybrid_learning.datasets.transforms.tuple_transforms.PackMask(selected_index=0)[source]
Bases:
_SingleIndexTupleTrafoGiven a 3-tuple of prediction, target, mask tensors merge mask and target and return a two-tuple. This is helpful, if some later operation works on two-tuples only.
Public Data Attributes:
Inherited from : py: class:_SingleIndexTupleTrafo
settingsSettings to reproduce the instance.
Inherited from : py: class:Transform
IDENTITY_CLASSThe identity class or classes for composition / addition.
settingsSettings to reproduce the instance.
Public Methods:
apply_to(prediction, target, mask)Application of transformation.
Inherited from : py: class:Transform
apply_to(prediction, target, mask)Application of transformation.
Special Methods:
Inherited from : py: class:_SingleIndexTupleTrafo
__init__([selected_index])Init.
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__(*inps)General call to the transformation.
- Parameters
selected_index (int) –