[null,null,["Last updated 2024-09-20 UTC."],[],[],null,["# tff.learning.models.model_from_functional\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |\n\nConverts a `FunctionalModel` to a [`tff.learning.models.VariableModel`](../../../tff/learning/models/VariableModel). \n\n tff.learning.models.model_from_functional(\n functional_model: ../../../tff/learning/models/FunctionalModel,\n metric_constructors: Sequence[Callable[[], tf.keras.metrics.Metric]] = ()\n ) -\u003e ../../../tff/learning/models/VariableModel\n\n| **Warning:** The `metrics_constructors` argument will *replace* any metrics that were originally attached to the `FunctionalModel` with new metrics.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `functional_model` | A [`tff.learning.models.FunctionalModel`](../../../tff/learning/models/FunctionalModel) to convert. |\n| `metric_constructors` | An optional sequence of callables that return newly constructed [`tf.keras.metrics.Metric`](https://www.tensorflow.org/api_docs/python/tf/keras/Metric) objects to attached to the output [`tff.learning.models.VariableModel`](../../../tff/learning/models/VariableModel). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A new [`tff.learning.models.VariableModel`](../../../tff/learning/models/VariableModel) with the same behavior as `functional_model`. ||\n\n\u003cbr /\u003e"]]