tff.learning.models.from_keras_model
Stay organized with collections
Save and categorize content based on your preferences.
tff.learning.models.from_keras_model(
keras_model: tf.keras.Model,
loss: Loss,
input_spec,
loss_weights: Optional[list[float]] = None,
metrics: Optional[Union[list[tf.keras.metrics.Metric], list[Callable[[], tf.keras.
metrics.Metric]]]] = None
) -> tff.learning.models.VariableModel
Used in the notebooks
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.
[null,null,["Last updated 2024-09-20 UTC."],[],[],null,["# tff.learning.models.from_keras_model\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\n tff.learning.models.from_keras_model(\n keras_model: tf.keras.Model,\n loss: Loss,\n input_spec,\n loss_weights: Optional[list[float]] = None,\n metrics: Optional[Union[list[tf.keras.metrics.Metric], list[Callable[[], tf.keras.\n metrics.Metric]]]] = None\n ) -\u003e ../../../tff/learning/models/VariableModel\n\n### Used in the notebooks\n\n| Used in the tutorials |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| - [Federated Learning for Image Classification](https://www.tensorflow.org/federated/tutorials/federated_learning_for_image_classification) - [Federated Learning for Text Generation](https://www.tensorflow.org/federated/tutorials/federated_learning_for_text_generation) - [Differential Privacy in TFF](https://www.tensorflow.org/federated/tutorials/federated_learning_with_differential_privacy) - [TFF simulations with accelerators](https://www.tensorflow.org/federated/tutorials/simulations_with_accelerators) |"]]