tff.backends.mapreduce.BroadcastForm
Stay organized with collections
Save and categorize content based on your preferences.
Standardized representation of server-to-client logic.
tff.backends.mapreduce.BroadcastForm(
compute_server_context,
client_processing,
server_data_label=None,
client_data_label=None
)
This class is designed to represent computations of the form:
server_data_type = self.compute_server_context.type_signature.parameter
client_data_type = self.client_processing.type_signature.parameter[1]
@tff.federated_computation(server_data_type, client_data_type)
def _(server_data, client_data):
# Select out the bit of server context to send to the clients.
context_at_server = tff.federated_map(
self.compute_server_context, server_data)
# Broadcast the context to the clients.
context_at_clients = tff.federated_broadcast(context_at_server)
# Compute some value on the clients based on the server context and
# the client data.
return tff.federated_map(
self.client_processing, (context_at_clients, client_data))
Attributes |
client_data_label
|
|
client_processing
|
|
compute_server_context
|
|
server_data_label
|
|
Methods
summary
View source
summary(
print_fn=print
)
Prints a string summary of the BroadcastForm
.
Args |
print_fn
|
Print function to use. It will be called on each line of the
summary in order to capture the string summary.
|
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.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "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."],[],[]]