哪种版本的Tensorflow联合已有模块; Federated_computation'?

发布于 2025-02-02 21:36:44 字数 756 浏览 5 评论 0原文

我正在尝试安装在Google Collact上联合的TensorFlow,但是与版本发生冲突,如果我安装了以前的版本或类似的错误,我要么会遇到此错误。

module tensorflow_federated.python has no attribute federated_computation

如果我想安装新版本,则在安装过程中会提供“需要此版本,但您拥有此版本”。 我很困惑。是否有一种简单的方法可以使用TensorFlow联合学习?我试图在本地安装它,但这也不起作用。 为什么很难使用它?

​一个较新版本

'type' object is not subscribable

和版本20的错误

module 'tensorflow_federated.python' has no attribute 'federated_computation'

I am trying to install Tensorflow federated on google collab, but there is a conflict with versions, I either get this error if I install previous versions or similar errors.

module tensorflow_federated.python has no attribute federated_computation

If I want to install the new version it gives the "this requires this version but you have this version" during the installation.
I am very confused. Is there an easy way to use Tensorflow federated learning? I tried to install it locally but that also didn't work.
Why is it so hard to use it?

enter image description here

enter image description here

If I uninstalled all packages and installed them again it gives me the error mentioned above

If I try to import it ignoring the errors in the pictures it gives me this error with a newer version

'type' object is not subscribable

And this error with version 20

module 'tensorflow_federated.python' has no attribute 'federated_computation'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

記柔刀 2025-02-09 21:36:44

问题在于,

  1. 您需要安装tensorflow联合学习版本0.20.0
!pip install --quiet tensorflow-federated==0.20.0
  1. 忽略依赖关系错误,
  2. 而不是以下
from tensorflow_federated import python as tff

用法:

import tensorflow_federated as tff

The problem was that

  1. you need to install Tensorflow federated learning version 0.20.0
!pip install --quiet tensorflow-federated==0.20.0
  1. Ignore the dependency error
  2. Instead of the below
from tensorflow_federated import python as tff

use:

import tensorflow_federated as tff
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文