跑代码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 分钟前
单芯片同时跑 Linux 与 RT-Thread:RV1126B的AMP异构方案完整拆解
linux·运维·服务器
小雪崩8 分钟前
嵌入式学习:Linux驱动开发总结
linux·驱动开发·学习
2301_786756609 分钟前
2026 JCR 秋季数据重载解读:影响因子为什么会变?附期刊影响力数据批量追踪方案
java·服务器·前端
Lynne30910 分钟前
TSN 在变电站自动化通信网络升级中的应用价值与技术挑战
服务器·网络·数据库
运维开发那些事11 分钟前
推理集群稳定性最佳实践
k8s·gpu算力
C++ 老炮儿的技术栈19 分钟前
std::atomic 是什么
linux·c语言·网络·c++·visual studio
xixiaoyunya23 分钟前
把网站状态巡检自动化:从“每天手动刷一遍”到秒级无人值守
运维·自动化
闲云野鹤在人间32 分钟前
Ubuntu 24.04 安装过程
服务器·数据库·ubuntu
2401_8628808237 分钟前
input 子系统框架 、platform 驱动框架
linux·驱动开发·嵌入式硬件
Liuqy-0538 分钟前
线程的互斥与同步机制——互斥锁、条件变量、无名信号量
linux·开发语言·线程·进程·条件变量·同步·互斥