Returns a ServerState
with updated model weights.
tff.learning.state_with_new_model_weights(
server_state: tff.learning.framework.ServerState
,
trainable_weights: list[np.ndarray],
non_trainable_weights: list[np.ndarray]
) -> tff.learning.framework.ServerState
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.
Args |
server_state
|
A tff.learning.framework.ServerState .
|
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 .
|