Builds the TFF computation for federated evaluation of the given model.
tff.templates.MeasuredProcess] = None,
metrics_aggregator: Optional[_MetricsAggregator] = None,
use_experimental_simulation_loop: bool = False
Used in the notebooks
A no-arg function that returns a
tff.learning.Model, or an
instance of a
tff.learning.models.FunctionalModel. When passing a
callable, the callable must not capture TensorFlow tensors or variables
and use them. The model must be constructed entirely from scratch on each
invocation, returning the same pre-constructed model each call will result
in an error.
tff.templates.MeasuredProcess that broadcasts the
model weights on the server to the clients. It must support the signature
(input_values@SERVER -> output_values@CLIENTS) and have empty state. If
set to default None, the server model is broadcast to the clients using
the default tff.federated_broadcast.
An optional function that takes in the metric finalizers
tff.learning.Model.metric_finalizers()) and a
tff.types.StructWithPythonType of the unfinalized metrics (i.e., the TFF
returns a federated TFF computation of the following type signature
local_unfinalized_metrics@CLIENTS -> aggregated_metrics@SERVER. If
tff.learning.metrics.sum_then_finalize, which returns a
federated TFF computation that sums the unfinalized metrics from
CLIENTS, and then applies the corresponding metric finalizers at
Controls the reduce loop function for
input dataset. An experimental reduce loop is used for simulation.
A federated computation (an instance of
tff.Computation) that accepts
model parameters and federated data, and returns the evaluation metrics.