tff.learning.state_with_new_model_weights

Returns a ServerState with updated model weights.

This function cannot currently be used for tff.learning.algorithms, which can have a different ServerState structure. For those methods, use the tff.learning.algorithms.templates.LearningProcess.set_model_weights method on the created process.

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 values in the order of the original model's trainable_variables.
non_trainable_weights A list of numpy values in the order of the original model's non_trainable_variables.

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