AttributeError: module 'tensorflow_federated.python.learning' has no attribute 'algorithms'
AttributeError: module 'tensorflow_federated.python.learning' has no attribute 'algorithms' Question: 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 def model_fn(): model = tf.keras.models.Sequential([ tf.keras.layers.Dense(10, tf.nn.softmax, input_shape=(784,), kernel_initializer=’zeros’) ]) trainer = tff.learning.algorithms.build_weighted_fed_avg( model_fn, client_optimizer_fn=lambda: tf.keras.optimizers.SGD(0.1)) However, …