跑代码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

相关推荐
江畔何人初4 小时前
iptables 和 IPVS 代理模式 Service 的区别
linux·运维·服务器·网络·云原生·kubernetes·代理模式
2601_949221036 小时前
Splashtop赋能企业级远程办公全场景安全连接成选型优选
运维·人工智能·安全
七度黑光7 小时前
用 openclaw 给故障复盘打分:质量审核自动化实践
运维·服务器·前端·数据库·自动化
xuefeiniao7 小时前
docker.desktop无法启动,导出镜像后
服务器·docker
123过去7 小时前
nfc-list使用教程
linux·网络·测试工具·安全
last demo8 小时前
mysql
运维·数据库·mysql·oracle
灰阳阳8 小时前
Dockerfile实践-构建Nginx镜像
运维·nginx·docker·dockerfile
evo-master9 小时前
网络故障排除方法
linux·服务器·网络
Johnstons9 小时前
网络流量监控工具怎么选
运维·网络·网络故障排除·网络流量分析·网络性能监控
爱学习的小囧10 小时前
VMware Horizon 8 智能卡认证信任库配置攻略:新增 Root CA 导入指南
服务器·esxi·vmware·horizon