tff.aggregators.WeightedAggregationFactory
Stay organized with collections
Save and categorize content based on your preferences.
Factory for creating tff.templates.AggregationProcess
with weights.
Methods
create
View source
@abc.abstractmethod
create(
value_type: ValueType, weight_type: ValueType
) -> tff.templates.AggregationProcess
Creates a tff.aggregators.AggregationProcess
with weights.
The provided value_type
and weight_type
are non-federated tff.Type
s.
That is, neither is a tff.FederatedType
.
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.
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.WeightedAggregationFactory\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\nFactory for creating [`tff.templates.AggregationProcess`](../../tff/templates/AggregationProcess) with weights.\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 @abc.abstractmethod\n create(\n value_type: ValueType, weight_type: ValueType\n ) -\u003e ../../tff/templates/AggregationProcess\n\nCreates a `tff.aggregators.AggregationProcess` with weights.\n\nThe provided `value_type` and `weight_type` are non-federated [`tff.Type`](../../tff/types/Type)s.\nThat is, neither is a [`tff.FederatedType`](../../tff/types/FederatedType).\n\nThe returned `tff.aggregators.AggregationProcess` will be created\nfor aggregation of pairs of values matching `value_type` and `weight_type`\nplaced at [`tff.CLIENTS`](../../tff#CLIENTS). That is, its `next` method will expect type\n`\u003cS@SERVER, {value_type}@CLIENTS, {weight_type}@CLIENTS\u003e`, where `S` is the\nunplaced return type of its `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| `weight_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"]]