繁体   English   中英

无法安装 tensorflow_federated

[英]Cant to install tensorflow_federated

我尝试安装 tensorflow 联合。

pip install --quiet --upgrade tensorflow_federated_nightly

但是当我想导入 tensorflow federated 时,我收到此警告,然后重新启动 google colab notebook。

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 federated:

pip install --quiet --upgrade tensorflow_federated

但是在导入 tensorflow federated 时出错

TypeError: 'type' object is not subscriptable

我如何解决它?

这是一个兼容性问题,我在使用 Google Colab 时遇到了同样的错误消息,刚刚安装了tensorflow-federated==0.20.0作为 github 上此问题中所述的快速修复: https ://github.com/tensorflow/federated /issues/2748#issuecomment-1107437271

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM