tff.backends.native.compile_to_mergeable_comp_form
Stay organized with collections
Save and categorize content based on your preferences.
Compiles a computation with a single aggregation to MergeableCompForm
.
tff.backends.native.compile_to_mergeable_comp_form(
comp: tff.framework.ConcreteComputation
) -> tff.framework.MergeableCompForm
Compilation proceeds by splitting on the lone aggregation, and using the
aggregation's internal functions to generate a semantically equivalent
instance of mergeable_comp_execution_context.MergeableCompForm
.
Args |
comp
|
Instance of computation_impl.ConcreteComputation to compile. Assumed
to be representable as a computation with a single aggregation in its
body, so that for example two parallel aggregations are allowed, but
multiple dependent aggregations are disallowed. Additionally assumed to be
of functional type.
|
Returns |
A semantically equivalent instance of
mergeable_comp_execution_context.MergeableCompForm .
|
Raises |
TypeError
|
If comp is not a building block, or is not of functional TFF
type.
|
ValueError
|
If comp cannot be represented as a computation with at most
one aggregation in its body.
|
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."],[],[]]