tff.aggregators.WeightedAggregationFactory

Factory for creating tff.templates.AggregationProcess with weights.

Methods

create_weighted

View source

Creates a tff.aggregators.AggregationProcess with weights.

The provided value_type and weight_type are non-federated tff.Type objects, that is, value_type.is_federated() and weight_type.is_federated() should return False.

The returned tff.aggregators.AggregationProcess will be created for aggregation of pairs of values matching value_type and weight_type placed at tff.CLIENTS. That is, its next method will expect type <S@SERVER, {value_type}@CLIENTS, {weight_type}@CLIENTS>, where S is the unplaced return type of its initialize method.

Args
value_type A non-federated tff.Type (value_type.is_federated() returns False).
weight_type A non-federated tff.Type (weight_type.is_federated() returns False).

Returns
A tff.templates.AggregationProcess.