# tff.aggregators.as_weighted_aggregator

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) 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) |

Constructs a weighted wrapper for an unweighted aggregation factory.

    tff.aggregators.as_weighted_aggregator(
        unweighted_aggregator: https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/UnweightedAggregationFactory
    ) -> https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/WeightedAggregationFactory

The returned [`tff.aggregators.WeightedAggregationFactory`](https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/WeightedAggregationFactory) has the same
functionality as the provided `unweighted_aggregator`, ignoring the provided
weights. This is useful when converting unweighted aggregator to a weighted
aggregator which is "always uniformly weighted".

<br />

<br />

<br />

| ## Args ||
|---|---|
| `unweighted_aggregator` | A [`tff.aggregators.UnweightedAggregationFactory`](https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/UnweightedAggregationFactory). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A [`tff.aggregators.WeightedAggregationFactory`](https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/WeightedAggregationFactory). ||

<br />