View source on GitHub |
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 output
tff.learning.models.VariableModel .
|
Returns | |
---|---|
A new tff.learning.models.VariableModel with the same behavior as
functional_model .
|