gpt4 book ai didi

linux - Tensorflow 在 proto-files 上创建错误

转载 作者:太空宇宙 更新时间:2023-11-04 11:46:38 25 4
gpt4 key购买 nike

背景:

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

问题:

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

采取的行动:

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

平台:

Ubuntu 18.10,v 64 位 GPU。 Python 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".

最佳答案

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

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

  1. 按照此处的说明安装 GPU、CUDA、CUDNN 的驱动程序,https://www.tensorflow.org/install/gpu

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

关于linux - Tensorflow 在 proto-files 上创建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57415721/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com