Builds MeasuredProcess for weights of model returned by model_fn.

Used in the notebooks

Used in the tutorials

This method creates a SimpleEncoder for every weight of model created by model_fn, as returned by encoder_fn.

model_fn A Python callable with no arguments function that returns a tff.learning.Model.
encoder_fn A Python callable with a single argument, which is expected to be a tf.Tensor of shape and dtype to be encoded. The function must return a tensor_encoding.core.SimpleEncoder, which expects a tf.Tensor with compatible type as the input to its encode method.

A MeasuredProcess for encoding and broadcasting the weights of model created by model_fn.

TypeError If model_fn or encoder_fn are not callable objects.