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

相关推荐
xlq223227 分钟前
40.线程控制
linux
day day day ...1 小时前
MyBatis条件误写引发的查询条件污染分析与防范
java·服务器·tomcat
TechMasterPlus1 小时前
Linux U-Boot 与内核启动流程深度解析:从上电到 Shell 的完整之旅
linux·运维·服务器
大白菜和MySQL1 小时前
Linux下dhcp服务搭建
linux·运维·服务器
大白菜和MySQL1 小时前
linux系统环境常用命令
android·linux·adb
SPC的存折1 小时前
1、MySQL故障排查与运维案例
linux·运维·服务器·数据库·mysql
Run_Teenage1 小时前
Linux:认识信号,理解信号的产生和处理
linux·运维·算法
Deitymoon2 小时前
linux——TCP服务器获取客户端IP地址
linux·服务器·tcp/ip
CDN3602 小时前
高防服务器磁盘 / CPU 爆满?攻击引流与资源扩容实战
运维·服务器·网络协议
小贾要学习2 小时前
【Linux】应用层自定义协议与序列化
linux·服务器·c++·json