tff.federated_select
Stay organized with collections
Save and categorize content based on your preferences.
Sends selected values from a server database to clients.
tff.federated_select(
client_keys, max_key, server_val, select_fn
)
Used in the notebooks
Args |
client_keys
|
tff.CLIENTS -placed one-dimensional fixed-size non-negative
int32 keys used to select values from database to load for each
client.
|
max_key
|
A tff.SERVER -placed int32 indicating the maximum value of any
of client_keys (so that all client keys are in the range [0, max_key] ,
inclusive). Lower values may permit more optimizations.
|
server_val
|
tff.SERVER -placed value used as an input to select_fn .
|
select_fn
|
A tff.Computation which accepts unplaced server_val and a
int32 client key and returns a value to be sent to the client.
select_fn should be deterministic (nonrandom).
|
Returns |
tff.CLIENTS -placed sequences of values returned from select_fn . In each
sequence, the order of values will match the order of keys in the
corresponding client_keys tensor. For example, a client with keys
[1, 2, ...] will receive a sequence of values
[select_fn(server_val, 1), select_fn(server_val, 2), ...] .
|
Raises |
TypeError
|
If client_keys is not of type {int32[N]}@CLIENTS , if
max_key is not of type int32@SERVER , if server_val is not a
server-placed value (S@SERVER ), or if select_fn is not a function
of type <S, int32> -> RESULT .
|
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-20 UTC."],[],[]]