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

相关推荐
上海云盾-高防顾问1 小时前
边缘验签是什么
运维·服务器·网络
fruge1 小时前
SSH、RDP、VNC不必各开一个客户端:Next Terminal用Web入口统一管理远程资产和会话记录
运维·前端·ssh
天南散修2 小时前
《802.11-2024》第08讲 · 聚合与块确认:把「一次一帧」变成「一次一批」
linux·网络·wifi·802.11
中屹指纹浏览器svip2 小时前
什么是设备数字特征追踪?
运维
Source.Liu2 小时前
【A11】服务器数据库结构笔记
服务器·数据库·笔记
企业解惑小能手-域智盾系统2 小时前
终端安全管理软件怎么选?终端安全管理不是“装个客户端”:从底层逻辑看企业怎么选
服务器·网络·安全·域智盾软件
Dxy12393102162 小时前
Linux 服务器 vi 命令怎么使用
linux·运维·服务器
叼烟扛炮2 小时前
Linux 学习笔记(十五):进程的魔法 fork 与 僵尸孤儿
linux·运维·服务器
钝挫力PROGRAMER2 小时前
从“硬件报错”到“内核崩溃”:一次超微(Supermicro)服务器失联问题解决记录
服务器·内核升级·无法连接
manageengine2 小时前
PHP2Shell 事件复盘:企业应该如何自查、修复与规模化处置
运维·安全·php