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

相关推荐
老一岁10 分钟前
csdn-mysql索引与redis命令
linux
handsome_sai3 小时前
《Linux 小白查看系统与软件商店指南》
linux·运维·服务器
wtblszn3 小时前
水库大坝安全监测与设备运维一体化解决方案
运维·数据库·安全
Rabitebla3 小时前
【Linux】 文件系统(五):挂载与软硬链接,多个文件系统怎样组成统一目录树
linux·运维·服务器·c++·笔记·学习·算法
数字新视界3 小时前
动环智能监控历史数据留存与故障回溯方法
运维·服务器·网络·机房·模块化机房
皓月盈江3 小时前
云服务器上部署Hexo静态博客
linux·服务器·hexo·个人博客·云服务器·个人网站·静态博客
遥夜人间3 小时前
Nginx 纳入 systemd 管理
运维·网络·nginx
qeen875 小时前
【Linux】线程的基本认识及与进程的关系、对比
linux·运维
Smoothcloud润云6 小时前
GPU服务器租用训练缓存小文件与inode耗尽排查实战
运维·服务器·人工智能·缓存·ai·gpu算力
疯华整猫6 小时前
一条 kill -9 杀不掉的进程:AI 时代,程序员为什么必须精通 Linux
linux