tff.learning.models.model_from_functional | TensorFlow Federated (original) (raw)
tff.learning.models.model_from_functional
Converts a FunctionalModel
to a tff.learning.models.VariableModel.
tff.learning.models.model_from_functional(
functional_model: tff.learning.models.FunctionalModel,
metric_constructors: Sequence[Callable[[], tf.keras.metrics.Metric]] = ()
) -> tff.learning.models.VariableModel
Args | |
---|---|
functional_model | A tff.learning.models.FunctionalModel to convert. |
metric_constructors | An optional sequence of callables that return newly constructed tf.keras.metrics.Metric objects to attached to the outputtff.learning.models.VariableModel. |
Returns |
---|
A new tff.learning.models.VariableModel with the same behavior asfunctional_model. |
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.