Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tff.learning.state_with_new_model_weights

View source

Returns a ServerState with updated model weights.

tff.learning.state_with_new_model_weights(
    server_state,
    trainable_weights,
    non_trainable_weights
)

Args:

  • server_state: A server state object returned by an iterative training process like tff.learning.build_federated_averaging_process.
  • trainable_weights: A list of numpy arrays in the order of the original model's trainable_variables.
  • non_trainable_weights: A list of numpy arrays in the order of the original model's non_trainable_variables.

Returns:

A new server ServerState object which can be passed to the next method of the iterative process.