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

相关推荐
Jaygee-几秒前
GMSSH 是什么?一款面向 AI 时代的可视化服务器运维系统
运维·服务器
赴前尘27 分钟前
Linux/Unix 系统中以后台方式运行程序
linux·服务器·unix
b***25111 小时前
比斯特自动化动力电池组半自动生产线的工艺革新与效率提升
运维·自动化
打码人的日常分享1 小时前
新型智能建造解决方案
运维·人工智能·安全·系统安全·制造
默|笙1 小时前
【Linux】线程互斥与同步_同步(2)_环形队列
linux·运维·服务器
cui_ruicheng1 小时前
Linux IO入门(一):从C语言IO到文件描述符
linux·运维·c语言
丸子家的银河龙1 小时前
yocto使用实例[1]-自定义内核配方
linux
北京耐用通信1 小时前
工业通信升级:耐达讯自动化CAN转EtherCAT网关的高效落地方案
服务器·人工智能·科技·物联网·自动化·信息与通信
青花瓷2 小时前
ubuntu22.04的ibus中文输入法的安装
运维·ubuntu
Wenweno0o2 小时前
CC-Switch & Claude 基于 Linux 服务器安装使用指南
linux·服务器·claude code·cc-switch