Creates an aggregation factory for quantization and entropy coding.
tff.learning.entropy_compression_aggregator(
*,
step_size: float = 0.5,
zeroing: bool = True,
clipping: bool = True,
weighted: bool = True,
debug_measurements_fn: Optional[Callable[[tff.aggregators.AggregationFactory
], tff.aggregators.AggregationFactory
]] = None
) -> tff.aggregators.AggregationFactory
Args |
step_size
|
A positive float that determines the step size between adjacent
quantization levels; suggested range [0.1, 10.0].
|
zeroing
|
A boolean indicating whether to add zeroing out extreme client
updates (True ) or not (False ).
|
clipping
|
A boolean indicating whether to add clipping to large client
updates (True ) or not (False ).
|
weighted
|
A boolean indicating whether client model weights should be
averaged in a weighted manner (True ) or unweighted manner (False ).
|
debug_measurements_fn
|
A callable to add measurements suitable for debugging
learning algorithms, with possible values as None,
tff.learning.add_debug_measurements or
tff.learning.add_debug_measurements_with_mixed_dtype .
|
Raises |
TypeError
|
if debug_measurement_fn yields an aggregation factory whose
weight type does not match weighted .
|
ValueError
|
if step_size is not a positive float.
|