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

相关推荐
Ai1731639157918 分钟前
GB200 NVL72超节点深度解析:架构、生态与产业格局
大数据·服务器·人工智能·神经网络·机器学习·计算机视觉·架构
思茂信息34 分钟前
CST交叉cable的串扰(crosstalk)仿真
服务器·开发语言·人工智能·php·cst
weixin_449173651 小时前
Linux -- 项目中查找日志的常用Linux命令
linux·运维·服务器
琉璃榴1 小时前
Visual Studio Code连接远程服务器
服务器·vscode·github
深念Y2 小时前
赛米尼M02/海纳斯HiNAS系统-WiFi驱动安装教程
运维·服务器·网络·docker·nas·机顶盒·hinas
想唱rap2 小时前
C++智能指针
linux·jvm·数据结构·c++·mysql·ubuntu·bash
会飞的土拨鼠呀2 小时前
Ubuntu24.04安装open-vm-tools
运维·服务器
Gofarlic_OMS2 小时前
应对MathWorks合规审查的专项准备工作
大数据·服务器·网络·数据库·人工智能
Strugglingler2 小时前
基于whiptail开发shell导航工具
linux·shell·ui设计·whiptail
艾醒(AiXing-w)2 小时前
Linux系统管理(二十)——Linux root磁盘不足?一站式应急清理方案(亲测可用)
linux·运维·服务器