tensorflow / tensorflow

An Open Source Machine Learning Framework for Everyone
https://tensorflow.org
Apache License 2.0
185.48k stars 74.16k forks source link

import tensorflow_federated as tff # List all attributes and methods in tff.learning print(dir(tff.learning.algorithms.build_weighted_fed_avg)) #74593

Closed rehmanaziz3 closed 3 days ago

rehmanaziz3 commented 2 weeks ago

AttributeError Traceback (most recent call last) in <cell line: 56>() 54 55 # Create a federated averaging process ---> 56 iterative_process = tff.learning.build_federated_averaging_process( 57 model_fn=model_fn, 58 client_optimizer_fn=lambda: tf.keras.optimizers.SGD(learning_rate=0.01),

AttributeError: module 'tensorflow_federated.python.learning' has no attribute 'build_federated_averaging_process'

tilakrayal commented 2 weeks ago

@rehmanaziz3, Looks like this issue is more related to TensorFlow_Federated, not with the tensorflow. Could you please check with the concerned repo. Also there is an open PR raised in that repo for removing the support for tf.keras.optimizers.Optimizer in tff.learning.algorithms which might be the reason for respective error.

https://github.com/google-parfait/tensorflow-federated/pull/4866

Thank you!

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.

github-actions[bot] commented 3 days ago

This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.

google-ml-butler[bot] commented 3 days ago

Are you satisfied with the resolution of your issue? Yes No