Attend the Women in ML Symposium on December 7 Register now

tff.learning.build_local_evaluation

Stay organized with collections Save and categorize content based on your preferences.

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

This produces an unplaced function that evaluates a tff.learning.Model on a tf.data.Dataset. This function can be mapped to placed data, i.e. is mapped to client placed data in build_federated_evaluation.

The TFF type notation for the returned computation is:

(<M, D*> → <local_outputs=N, num_examples=tf.int64>)

Where M is the model weights type structure, D is the type structure of a single data point, and N is the type structure of the local metrics.

model_fn A no-arg function that returns a tff.learning.Model.
model_weights_type The tff.Type of the model parameters that will be used to initialize the model during evaluation.
batch_type The type of one entry in the dataset.
use_experimental_simulation_loop 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 sequential data, and returns the evaluation metrics.