跑代码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 分钟前
Nginx性能调优
运维·nginx
ChengQianO14 分钟前
从 0 开始:Mac 下 UTM 虚拟机安装 ROS Noetic(Ubuntu 20.04)
linux·ubuntu·macos
智能工业品检测-奇妙智能20 分钟前
开源知识库平台有哪些
服务器·人工智能·spring boot·开源·openclaw·奇妙智能
深念Y37 分钟前
旧物新生:用魅蓝Note5 root后搭建家用Linux服务器(部署宝塔/AList/QB)
linux·运维·服务器·手机·diy·魔改·魅族
wanhengidc1 小时前
云手机会导致本地数据被读取吗
运维·服务器·数据库·游戏·智能手机
CDN3601 小时前
360CDN SDK 游戏盾实测:游戏防护与延迟优化
运维·游戏·网络安全
野犬寒鸦1 小时前
从零起步学习计算机操作系统:内存管理篇
服务器·后端·学习·缓存·面试
weixin_447640061 小时前
AI使用验证:windows上通过WSL2运行ubuntu,ubuntu的系统时间变慢且不同步
linux·运维·ubuntu
开开心心就好1 小时前
轻量级PDF阅读器,仅几M大小打开秒开
linux·运维·服务器·安全·pdf·1024程序员节·oneflow
RDCJM1 小时前
Linux下MySQL的简单使用
linux·mysql·adb