Centered Clipping Function
Here's how to use the Centered Clipping function:
# Import the library
import charisius
# Initialize aggregator and vectors
aggregator = ...
vectors = [...]
# Call centered_clipping function
result = charisius.centered_clipping(aggregator, vectors)
Inputs
aggregator: object - The aggregator object containing the 'prev_momentum' property.
vectors: list - The list of PyTorch Tensors to be processed.
Outputs
result: torch.Tensor - The result vector after applying the centered clipping function.