Help protect the Great Barrier Reef with TensorFlow on Kaggle Join Challenge


Creates an aggregation factory to perform zeroing.

Used in the notebooks

Used in the tutorials

The created tff.templates.AggregationProcess zeroes out any values whose norm is greater than that determined by the provided zeroing_norm, before aggregating the values as specified by inner_agg_factory. Note that for weighted aggregation if some value is zeroed, the weight is unchanged. So for example if you have a zeroed weighted mean and a lot of zeroing occurs, the average will tend to be pulled toward zero. This is for consistency between weighted and unweighted aggregation

The provided zeroing_norm can either be a constant (for fixed norm), or an instance of tff.templates.EstimationProcess (for adaptive norm). If it is an estimation process, the value returned by its report method will be used as the zeroing norm. Its next method needs to accept a scalar float32 at clients, corresponding to the norm of value being aggregated. The process can thus adaptively determine the zeroing norm based on the set of aggregated values. For example if a tff.aggregators.PrivateQuantileEstimationProcess is used, the zeroing norm will be an estimate of a quantile of the norms of the values being aggregated.

The returned AggregationFactory takes its weightedness (UnweightedAggregationFactory vs. WeightedAggregationFactory) from inner_agg_factory.

zeroing_norm Either a float (for fixed norm) or an EstimationProcess (for adaptive norm) that specifies the norm over which the values should be zeroed.
inner_agg_factory A factory specifying the type of aggregation to be done after zeroing.
norm_order A float for the order of the norm. Must be 1., 2., or infinity.

An aggregation factory to perform L2 clipping.