0

Can anybody help me to replace this function? I am getting error for these code:

tff.learning.assign_weights_to_keras_model(eval_model, state.model)

1 Answer 1

0

The

tff.learning.assign_weights_to_keras_model

function has been removed from the new version of TensorFlow Federated.

The solution depends on which TFF version you are using. One replacement is:

Try replacing

tff.learning.assign_weights_to_keras_model(eval_model, state.model)

with

state.model.assign_weights_to(eval_model)

2nd replacement is(latest version):

Try replacing

tff.learning.assign_weights_to_keras_model(eval_model, state.model)

with

tff.learning.models.ModelWeights.assign_weights_to(
Sign up to request clarification or add additional context in comments.

1 Comment

Share your code sample, so that can give you more hints.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.