tff.sequence_sum
Stay organized with collections
Save and categorize content based on your preferences.
Computes a sum of elements in a sequence.
tff.sequence_sum(
value
)
Args |
value
|
A value of a TFF type that is either a sequence, or a federated
sequence.
|
Returns |
The sum of elements in the sequence. If the argument value is of a
federated type, the result is also of a federated type, with the sum
computed locally and independently at each location (see also a discussion
on sequence_map and sequence_reduce ).
|
Raises |
TypeError
|
If the arguments are of wrong or unsupported types.
|
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.sequence_sum\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\nComputes a sum of elements in a sequence. \n\n tff.sequence_sum(\n value\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------|---------------------------------------------------------------------------|\n| `value` | A value of a TFF type that is either a sequence, or a federated sequence. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| The sum of elements in the sequence. If the argument `value` is of a federated type, the result is also of a federated type, with the sum computed locally and independently at each location (see also a discussion on `sequence_map` and `sequence_reduce`). ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|-------------|-----------------------------------------------------|\n| `TypeError` | If the arguments are of wrong or unsupported types. |\n\n\u003cbr /\u003e"]]