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

相关推荐
顶点多余几秒前
进程控制详解
linux·运维·服务器
liuyao_xianhui1 分钟前
优选算法_丢失的数字_位运算_C++
linux·数据结构·c++·算法·动态规划·哈希算法·散列表
CCPC不拿奖不改名5 分钟前
RAG基础:评测系统RAGAS的四大指标
linux·服务器·人工智能·计算机视觉·前端框架·知识库搭建
阳光下的米雪9 分钟前
存储过程的使用以及介绍
java·服务器·数据库·pgsql
NGC_661111 分钟前
TCP可靠传输怎么实现的
服务器·网络·php
橘子1314 分钟前
ICMP协议
运维·服务器·网络
智能工业品检测-奇妙智能18 分钟前
openclaw使用硅基流动免费模型
服务器·人工智能·spring boot·电商·openclaw
chalmers_1519 分钟前
封禁暴力破解SSH的攻击IP
linux·服务器·ssh
xiaokangzhe42 分钟前
Nginx性能优化与监控
运维·nginx·性能优化
梓䈑42 分钟前
【CMake】CMake工程构建全流程 以及 相关命令行工具的介绍
linux·cmake