Identity

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

Bases: TupleTransforms

Simple identity transformation for example for defaults.

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)

Identity operation, nothing changed.

Inherited from : py: class:TupleTransforms

apply_to(*inputs)

Identity operation, nothing changed.

Inherited from : py: class:Transform

apply_to(*inputs)

Identity operation, nothing changed.

Special Methods:

__add__(other)

Return a flat composition of self with other.

__radd__(other)

Return a flat composition of other and self.

Inherited from : py: class:TupleTransforms

__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.


__add__(other)[source]

Return a flat composition of self with other. In case other is a no-op transforms, return a copy of self.

Returns

one of the summands in case the other is a no-op, else a hybrid_learning.datasets.transforms.common.Compose transforms

Parameters

other (Optional[TupleTransforms]) –

Return type

TupleTransforms

__radd__(other)[source]

Return a flat composition of other and self. See __add__().

Parameters

other (Optional[TupleTransforms]) –

Return type

TupleTransforms

apply_to(*inputs)[source]

Identity operation, nothing changed.