tff.aggregators.SumFactory
Stay organized with collections
Save and categorize content based on your preferences.
UnweightedAggregationFactory
for sum.
Inherits From: UnweightedAggregationFactory
Used in the notebooks
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
create(
value_type: factory.ValueType
) -> tff.templates.AggregationProcess
Creates a tff.aggregators.AggregationProcess
without weights.
The provided value_type
is a non-federated tff.Type
, that is, not a
tff.FederatedType
.
The returned tff.aggregators.AggregationProcess
will be created for
aggregation of values matching value_type
placed at tff.CLIENTS
.
That is, its next
method will expect type
<S@SERVER, {value_type}@CLIENTS>
, where S
is the unplaced return type of
its initialize
method.
Args |
value_type
|
A non-federated tff.Type .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-20 UTC.
[null,null,["Last updated 2024-09-20 UTC."],[],[],null,["# tff.aggregators.SumFactory\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |\n\n`UnweightedAggregationFactory` for sum.\n\nInherits From: [`UnweightedAggregationFactory`](../../tff/aggregators/UnweightedAggregationFactory)\n\n### Used in the notebooks\n\n| Used in the tutorials |\n|---------------------------------------------------------------------------------------------------------|\n| - [Implementing Custom Aggregations](https://www.tensorflow.org/federated/tutorials/custom_aggregators) |\n\nThe created [`tff.templates.AggregationProcess`](../../tff/templates/AggregationProcess) sums values placed at\n`CLIENTS`, and outputs the sum placed at `SERVER`.\n\nThe process has empty `state` and returns no `measurements`. For summation,\nimplementation delegates to the [`tff.federated_sum`](../../tff/federated_sum) operator.\n\nMethods\n-------\n\n### `create`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n create(\n value_type: factory.ValueType\n ) -\u003e ../../tff/templates/AggregationProcess\n\nCreates a `tff.aggregators.AggregationProcess` without weights.\n\nThe provided `value_type` is a non-federated [`tff.Type`](../../tff/types/Type), that is, not a\n[`tff.FederatedType`](../../tff/types/FederatedType).\n\nThe returned `tff.aggregators.AggregationProcess` will be created for\naggregation of values matching `value_type` placed at [`tff.CLIENTS`](../../tff#CLIENTS).\nThat is, its `next` method will expect type\n`\u003cS@SERVER, {value_type}@CLIENTS\u003e`, where `S` is the unplaced return type of\nits `initialize` method.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|--------------|-----------------------------------------------------|\n| `value_type` | A non-federated [`tff.Type`](../../tff/types/Type). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| A [`tff.templates.AggregationProcess`](../../tff/templates/AggregationProcess). ||\n\n\u003cbr /\u003e"]]