ksuit.data.pipeline.sample_processor¶
Attributes¶
Classes¶
Module Contents¶
- ksuit.data.pipeline.sample_processor.T¶
- class ksuit.data.pipeline.sample_processor.SampleProcessor¶
- abstractmethod inverse(key, value)¶
Inverts the transformation from the __call__ method of a single item in the batch. Only should be implemented if the SampleProcessor is invertable or if the identity function is valid.
- Parameters:
key (str) – The name of the item.
value (torch.Tensor) – The value of the item.
- Returns:
The (potentially) back-mapped name and the (potentially) denormalized value.
- Return type:
(key, value)
- static save_copy(obj)¶
Make a deep copy of an object to avoid modifying the original object.
- Parameters:
obj (T) – Any object that should be copied.
- Returns:
A deep copy of the input object.
- Return type:
T