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

相关推荐
还鮟13 分钟前
靶机远程控制实验命令与入门实践(Linux)
linux·网络·安全
TG:@yunlaoda360 云老大37 分钟前
华为云国际站代理商备份策略设置过程中遇到问题如何解决?
服务器·数据库·华为云
手揽回忆怎么睡1 小时前
Alibaba Linux 8安装jdk25
linux·运维·服务器
❀͜͡傀儡师1 小时前
docker一键部署网页版Win11系统
运维·docker·容器
2301_800050992 小时前
华为云介绍
运维·华为云
爱潜水的小L2 小时前
自学嵌入式day39,抓包
linux
萌萌哒草头将军2 小时前
AudioDock:服务器和 NAS 音频播放最棒的软件!🚀🚀🚀
服务器·docker·node.js
lifewange2 小时前
测试场景 Linux 命令速查表
linux·运维·服务器
Vect__2 小时前
进程控制详解
linux·驱动开发
就叫飞六吧3 小时前
JSONPath“隔空取物”思想,直击JSON深处的目标字段
服务器·windows·json