跑代码KGAT遇到的错误的解决过程记录

1.pip install -U protobuf

conda install scikit-learn

2. jupyterLab生成一个新的kernel:

conda create -n kgat5 python=3.7.2 ipykernel

python -m ipykernel install --name kgat5 --display-name kgat5 --user

3.pip install tensorflow-gpu=1.12.0

安装后import tensorflow as tf报错,按照如下修改后,还是报错

(196条消息) ImportError: libcublas.so.9.0: cannot open shared object file: No such file...问题原因及解决方法_lzw李正文的博客-CSDN博客

于是,提升了tf的版本号,还是1.x:

pip install tensorflow-gpu=1.15.0

pip install tensorflow_gpu-1.15.0-cp37-cp37m-manylinux2010_x86_64.whl

4.报错:

TypeError: Descriptors cannot not be created directly.

If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.

If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.

  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

解决方案:

pip install protobuf==3.20.*

5.CPU训练:

gpu-id=-1

6.报错:

2023-08-01 10:22:25.625741: F tensorflow/stream_executor/lib/statusor.cc:34] Attempting to fetch value instead of handling error Internal: no supported devices found for platform CUDA

Aborted (core dumped)

解决方案:

查看gpu使用情况: nvidia-smi

修改默认gpu-id=1

相关推荐
峰顶听歌的鲸鱼7 小时前
Kubernetes介绍和部署
运维·笔记·云原生·容器·kubernetes·学习方法
物理与数学7 小时前
linux 内存分布
linux·linux内核
信创天地8 小时前
自动化运维利器赋能信创:Ansible与SaltStack在国产系统的部署与批量管理实战
运维·自动化·ansible
东城绝神8 小时前
《Linux运维总结:基于ARM64+X86_64架构使用docker-compose一键离线部署MySQL8.0.43 NDB Cluster容器版集群》
linux·运维·mysql·架构·高可用·ndb cluster
creator_Li8 小时前
即时通讯项目--(1)环境搭建
linux·运维·ubuntu
Ka1Yan8 小时前
Docker:基本概念与快速入门
运维·docker·容器
Mr'liu9 小时前
MongoDB 7.0 副本集高可用部署
linux·mongodb
文静小土豆10 小时前
Rocky Linux 二进制 安装K8S-1.35.0高可用集群
linux·运维·kubernetes
小技工丨10 小时前
华为TaiShan 200 2280 ARM服务器虚拟化部署完整指南
运维·服务器·arm开发
暮云星影10 小时前
二、linux系统 应用开发:整体Pipeline流程
linux·arm开发