无法安装TensorFlow_federated

发布于 2025-01-30 01:55:58 字数 1651 浏览 5 评论 0原文

我尝试安装tensorflow联合。

pip install --quiet --upgrade tensorflow_federated_nightly

但是,当我想导入联合的张量流时,我会收到此警告,然后重新启动Google Colab笔记本。

WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.base has been moved to tensorflow.python.trackable.base. The old module will be deleted in version 2.11.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.checkpoint_management has been moved to tensorflow.python.checkpoint.checkpoint_management. The old module will be deleted in version 2.9.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.resource has been moved to tensorflow.python.trackable.resource. The old module will be deleted in version 2.11.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.util has been moved to tensorflow.python.checkpoint.checkpoint. The old module will be deleted in version 2.11.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.base_delegate has been moved to tensorflow.python.trackable.base_delegate. The old module will be deleted in version 2.11.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.graph_view has been moved to tensorflow.python.checkpoint.graph_view. The old module will be deleted in version 2.11.

另外,我尝试安装以这种方式联合的TensorFlow:

pip install --quiet --upgrade tensorflow_federated

但是,Federated Import Tensorflow

TypeError: 'type' object is not subscriptable

如何修复它时会出现错误?

I try to install tensorflow federated.

pip install --quiet --upgrade tensorflow_federated_nightly

but when I want to import tensorflow federated, I get this warning and after that google colab notebook is restarted.

WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.base has been moved to tensorflow.python.trackable.base. The old module will be deleted in version 2.11.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.checkpoint_management has been moved to tensorflow.python.checkpoint.checkpoint_management. The old module will be deleted in version 2.9.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.resource has been moved to tensorflow.python.trackable.resource. The old module will be deleted in version 2.11.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.util has been moved to tensorflow.python.checkpoint.checkpoint. The old module will be deleted in version 2.11.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.base_delegate has been moved to tensorflow.python.trackable.base_delegate. The old module will be deleted in version 2.11.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.graph_view has been moved to tensorflow.python.checkpoint.graph_view. The old module will be deleted in version 2.11.

Also, I try install tensorflow federated as this way:

pip install --quiet --upgrade tensorflow_federated

but get error when import tensorflow federated

TypeError: 'type' object is not subscriptable

how do I fix it?

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

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

发布评论

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

评论(1

夜唯美灬不弃 2025-02-06 01:55:58

这是一个兼容性问题,我在与Google COLAB合作时遇到了同样的错误消息,刚刚安装了TensorFlow-Federated == 0.20.0作为GITHUB上本期所述的快速修复:
htttps ://github.com/tensorflow/tensorflow/tensorflow/federated/federated/2748#issuecomment/2748#issuecomment/2748#issuecomment- 1107437271

It's a compatibility issue , I faced this same error message while working with Google Colab, just installed tensorflow-federated==0.20.0 as a quick fix as described in this issue on github:
https://github.com/tensorflow/federated/issues/2748#issuecomment-1107437271

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