This method doesn't support loss functions scaled by sample weights at the
current state. Keras models with non-None sample weights will fail because
sample weights aren't supported in model serialization and deserialization.
Args
keras_model
A tf.keras.Model object, should be uncompiled. If compiled,
the metrics, optimizer, and loss function will be ignored. Note: models
that have multiple outputs will send all outputs to the loss_fn.
If the following conditions: 1) the Keras model
contains a batch normalization layer, 2) the Keras model is with
non-trainable variable, 3) error occurs when converting the Keras model, 4)
the Keras model shares variable across layers, 5) the FunctionalModel is
used outside of a tff.tensorflow.computation decorated callable or a graph
context, 6) the Keras model contains a loss function with non-None sample
weights.