p2pfl.learning.compression.lra_strategy moduleΒΆ
LRA compression strategy.
- class p2pfl.learning.compression.lra_strategy.LowRankApproximation[source]ΒΆ
Bases:
TensorCompressorLow Rank optimization strategy.
- apply_strategy(params, threshold=0.95)[source]ΒΆ
Approximate the parameters preserving a target rank or energy threshold.
- Parameters:
params (
list[ndarray]) β The parameters to compress.threshold (
float) β Percentage between 0 and 1 of the energy to preserve.
- Return type:
tuple[list[ndarray],dict]