I am trying to run the code given by Tensorflow in their official documentation, pertaining to Tensorflow-Federated. The code is as follows:
import tensorflow as tf
import tensorflow_federated as tff
training_process = tff.learning.algorithms.build_weighted_fed_avg(get_dense_nn, client_optimizer_fn=lambda: tf.keras.Sequential.SGD(learning_rate=client_lr), server_optimizer_fn=lambda:tf.keras.optimizers.SGD(learning_rate=server_lr))
However, I am getting the following error:
AttributeError: module 'tensorflow_federated.python.learning' has no attribute 'from_keras_model'
Am I doing something wrong or is the documentation wrong?