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?
这是一个兼容性问题,我在使用 Google Colab 时遇到了同样的错误消息,刚刚安装了tensorflow-federated==0.20.0
作为 github 上此问题中所述的快速修复: https ://github.com/tensorflow/federated /issues/2748#issuecomment-1107437271
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.