【问题标题】:Tensorflow is creating an error on the proto-filesTensorflow 在 proto-files 上创建错误
【发布时间】:2019-08-08 15:08:29
【问题描述】:

背景

目的是开发一种涉及tensorflow的机器学习算法。

问题

导入 tensorflow 会导致错误:“文件“tensorboard/compat/proto/resource_handle.proto”的原始描述符无效”(请参阅​​最后我的代码后面的错误日志。)

采取的措施

尝试运行 pip uninstall protobuf。接下来,pip install --no-binary protobuf protobuf。 但是,这会产生第二个错误,即“没有 google protobuf。如果我安装 protobufs,我会再次遇到第一个错误。

平台

Ubuntu 18.10,v 64 位用于 GPU。蟒蛇 3.6.8。

我的代码

import tensorflow-nightly-gpu #(regardless of version of tf I get the error)

import pandas as pd

...

错误日志

Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file 
"tensorboard/compat/proto/resource_handle.proto":
  tensorboard.ResourceHandleProto.device: "tensorboard.ResourceHandleProto.device" is already defined in file "tensorboard/src/resource_handle.proto".
  tensorboard.ResourceHandleProto.container: "tensorboard.ResourceHandleProto.container" is already defined in file "tensorboard/src/resource_handle.proto".
  tensorboard.ResourceHandleProto.name: "tensorboard.ResourceHandleProto.name" is already defined in file "tensorboard/src/resource_handle.proto".
  tensorboard.ResourceHandleProto.hash_code: "tensorboard.ResourceHandleProto.hash_code" is already defined in file "tensorboard/src/resource_handle.proto".
  tensorboard.ResourceHandleProto.maybe_type_name: "tensorboard.ResourceHandleProto.maybe_type_name" is already defined in file "tensorboard/src/resource_handle.proto".

【问题讨论】:

    标签: linux python-3.x tensorflow


    【解决方案1】:

    通过这些步骤解决了我自己的问题:

    1.删除所有现有的 GPU、CUDA、CUDNN 驱动程序并从我的计算机中删除所有 tensorflow

    1. 在此处安装 GPU、CUDA、CUDNN 驱动程序,https://www.tensorflow.org/install/gpu

    2. 从这里安装 tensorflow,phttps://www.tensorflow.org/install/pip

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-03
      • 1970-01-01
      相关资源
      最近更新 更多