tff.aggregators.SumFactory

AggregationProcessFactory for sum.

Inherits From: AggregationProcessFactory

The created tff.templates.AggregationProcess sums values placed at CLIENTS, and outputs the sum placed at SERVER.

The process has empty state and returns no measurements. For summation, implementation delegates to the tff.federated_sum operator.

Methods

create

View source

Creates a tff.aggregators.AggregationProcess aggregating value_type.

The provided value_type is a non-federated tff.Type object, that is, value_type.is_federated() should return False. Provided value_type must be a tff.TensorType or a tff.StructType.

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

Args
value_type A tff.Type without placement.

Returns
A tff.templates.AggregationProcess.