【问题标题】:Error when running TensorFlow Federated on server在服务器上运行 TensorFlow Federated 时出错
【发布时间】:2020-07-09 05:31:01
【问题描述】:

当我尝试在服务器上加载 Tensorflow 联合库时出现以下错误。我正在使用 tensorflow_federated 版本 0.13.1

我在服务器上的 Cuda 版本是 10.2 。 Cudnn库7.6以上。

被问到的"libnvinfer.so.6" 是什么?

2020-03-28 17:26:18.357394: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2020-03-28 17:26:18.410547: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2020-03-28 17:26:18.464258: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
  File "FedAvgREALWORLDWork.py", line 52, in <module>
    import tensorflow_federated as tff
  File "/user/env/lib/python3.5/site-packages/tensorflow_federated/__init__.py", line 61, in <module>
    from tensorflow_federated.python import learning
  File "/user/env/lib/python3.5/site-packages/tensorflow_federated/python/learning/__init__.py", line 17, in <module>
    from tensorflow_federated.python.learning import framework
  File "/user/env/lib/python3.5/site-packages/tensorflow_federated/python/learning/framework/__init__.py", line 20, in <module>
    from tensorflow_federated.python.learning.framework.optimizer_utils import build_model_delta_optimizer_process
  File "/user/env/lib/python3.5/site-packages/tensorflow_federated/python/learning/framework/optimizer_utils.py", line 176
    f'({old_value.dtype}, {old_value.shape}) != '
    ^
SyntaxError: invalid syntax

【问题讨论】:

    标签: tensorflow-federated


    【解决方案1】:

    我认为你有一些库缺少“libvinfer”,例如要继续安装 cuda 10.1,你必须安装这些包

    # Install TensorRT. Requires that libcudnn7 is installed above.
    sudo apt-get install -y --no-install-recommends \
        libnvinfer6=6.0.1-1+cuda10.1 \
        libnvinfer-dev=6.0.1-1+cuda10.1 \
        libnvinfer-plugin6=6.0.1-1+cuda10.1
    

    我建议你看看这个:https://www.tensorflow.org/install/gpu 希望对你有帮助

    【讨论】:

      猜你喜欢
      • 2014-10-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多