tff.learning.build_federated_evaluation

View source on GitHub

Builds the TFF computation for federated evaluation of the given model.

Used in the notebooks

Used in the tutorials

model_fn A no-arg function that returns a tff.learning.Model. This method 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.

A federated computation (an instance of tff.Computation) that accepts model parameters and federated data, and returns the evaluation metrics as aggregated by tff.learning.Model.federated_output_computation.