|View source on GitHub|
tff.learning.Model for an example mini batch.
tff.learning.from_compiled_keras_model( keras_model, dummy_batch )
Used in the tutorials:
- Federated Learning for Image Classification
- Federated Learning for Text Generation
- High-performance simulations with TFF
tf.keras.Modelobject that was compiled.
dummy_batch: A nested structure of values that are convertible to batched tensors with the same shapes and types as expected by
forward_pass(). The values of the tensors are not important and can be filled with any reasonable input value.
keras_modelis not an instance of
keras_modelwas not compiled.