tff.learning.templates.FinalizerProcess
Stay organized with collections
Save and categorize content based on your preferences.
A stateful process for finalization of a round of training.
Inherits From: MeasuredProcess
, IterativeProcess
tff.learning.templates.FinalizerProcess(
initialize_fn: tff.Computation
,
next_fn: tff.Computation
,
*,
get_hparams_fn: Optional[tff.Computation
] = None,
set_hparams_fn: Optional[tff.Computation
] = None
)
A FinalizerProcess
is a tff.templates.MeasuredProcess
that formalizes the
type signature of initialize_fn
and next_fn
for the work performed by
server in a learning process after aggregating model updates from clients.
Args |
initialize_fn
|
A tff.Computation matching the criteria above.
|
next_fn
|
A tff.Computation matching the criteria above.
|
get_hparams_fn
|
An optional tff.Computation matching the criteria above.
If not provided, this defaults to a computation that returns an empty
ordred dictionary, regardless of the contents of the state.
|
set_hparams_fn
|
An optional tff.Computation matching the criteria above.
If not provided, this defaults to a pass-through computation, that
returns the input state regardless of the hparams passed in.
|
Raises |
TemplateNotFederatedError
|
If any of the federated computations provided
do not return a federated type.
|
TemplateNextFnNumArgsError
|
If the next_fn has an incorrect number
of arguments.
|
TemplatePlacementError
|
If any of the federated computations have an
incorrect placement.
|
FinalizerResultTypeError
|
If the second output of next_fn does not meet
the criteria outlined above.
|
GetHparamsTypeError
|
If the type signature of get_hparams_fn does not
meet the criteria above.
|
SetHparamsTypeError
|
If the type signature of set_hparams_fn does not
meet the criteria above.
|
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."],[],[]]