openfl.pipelines.random_shift_pipeline.RandomShiftTransformer
- class openfl.pipelines.random_shift_pipeline.RandomShiftTransformer
Bases:
TransformerRandom Shift Transformer class.
Methods
Backward pass - Decompress data.
Forward pass - compress data.
- backward(data, metadata, **kwargs)
Backward pass - Decompress data.
Implement the data transformation needed when going the oppposite direction to the forward method.
- Parameters:
data – The transformed data.
metadata – The metadata for the transformation.
- Returns:
The original data before the random shift.
- forward(data, **kwargs)
Forward pass - compress data.
Implement the data transformation.
- Parameters:
data – The data to be transformed.
- Returns:
transformed_data – The data after the random shift.
metadata – The metadata for the transformation.