无法安装TensorFlow_federated
我尝试安装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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个兼容性问题,我在与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