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

相关推荐
小叮当⇔21 分钟前
计算机网络实验——华为eNSP模拟器常用命令总结
服务器·计算机网络·华为
开开心心就好34 分钟前
实用PDF擦除隐藏信息工具,空白处理需留意
运维·服务器·windows·pdf·迭代器模式·桥接模式·1024程序员节
礼拜天没时间.34 分钟前
Docker Registry私有仓库搭建与使用
java·运维·docker·云原生·容器·centos
落羽的落羽42 分钟前
【Linux系统】磁盘ext文件系统与软硬链接
linux·运维·服务器·数据库·c++·人工智能·机器学习
码客研究员43 分钟前
Kafka(05)搭建高可用Kafka集群:从三台服务器开始
服务器·kafka·linq
Codefengfeng1 小时前
Kali-linux中安装与使用Stegsolve
linux·运维·服务器
桂花很香,旭很美1 小时前
[7天实战入门Go语言后端] Go 后端实战踩坑与解法手册
服务器·网络·golang
tritone1 小时前
初探云原生:在阿贝云免费服务器上学习负载均衡的实践心得
服务器·学习·云原生
数据知道2 小时前
PostgreSQL:如何在容器中部署 Crunchy Data Operator(Kubernetes 运维)
运维·postgresql·kubernetes