OnIndex

class hybrid_learning.datasets.transforms.tuple_transforms.OnIndex(indices, trafo)[source]

Bases: _IndexedTupleTrafo, _PartialTupleTrafo

Apply a given transformation to tuple items at given indices.

Public Data Attributes:

settings

Settings to reproduce the instance.

Inherited from : py: class:_IndexedTupleTrafo

settings

Settings to reproduce the instance.

Inherited from : py: class:_PartialTupleTrafo

settings

Settings to reproduce the instance.

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:_IndexedTupleTrafo

unique_pos_indices_for(inputs)

For an input tuple of certain length return the unique positive indices to work on.

Inherited from : py: class:TupleTransforms

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__(indices, trafo)

Init.

Inherited from : py: class:_IndexedTupleTrafo

__init__(indices, trafo)

Init.

Inherited from : py: class:_PartialTupleTrafo

__init__(indices, trafo)

Init.

Inherited from : py: class:TupleTransforms

__init__(indices, trafo)

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.


Parameters
__init__(indices, trafo)[source]

Init.

Parameters
apply_to(*inputs)[source]

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

Return type

Tuple

property settings: Dict[str, Any]

Settings to reproduce the instance.