TupleTransforms

class hybrid_learning.datasets.transforms.tuple_transforms.TupleTransforms[source]

Bases: Transform

Base class of tuple transformations that accept the same amount of inputs as they provide outputs. To inherit, override settings and apply_to().

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(*inputs)

Apply the transformation to the tuple (inp, target); the output again is a tuple.

Inherited from : py: class:Transform

apply_to(*inputs)

Apply the transformation to the tuple (inp, target); the output again is a tuple.

Special Methods:

__init__()

Init.

__call__(*inputs)

Apply the transformation to the tuple (inp, target); the output again is a tuple.

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 with other.

__radd__(other)

Return a flat composition of other and self.

__call__(*inputs)

Apply the transformation to the tuple (inp, target); the output again is a tuple.


__call__(*inputs)[source]

Apply the transformation to the tuple (inp, target); the output again is a tuple.

Return type

Tuple

__init__()[source]

Init. Set the identity transformation for this class.

abstract apply_to(*inputs)[source]

Apply the transformation to the tuple (inp, target); the output again is a tuple.

Return type

Tuple