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

相关推荐
有毒的教程4 小时前
Ubuntu 虚拟机磁盘空间不足完整解决教程
linux·运维·ubuntu
WiChP4 小时前
【V0.1B5】从零开始的2D游戏引擎开发之路
java·服务器·数据库
geNE GENT5 小时前
Nginx WebSocket 长连接及数据容量配置
运维·websocket·nginx
小樱花的樱花6 小时前
C++ new和delete用法详解
linux·开发语言·c++
APIshop6 小时前
Java获取京东商品详情接口(item_get)实战指南
java·linux·数据库
Cx330❀6 小时前
一文吃透Linux System V共享内存:原理+实操+避坑指南
大数据·linux·运维·服务器·人工智能
薛定谔的悦6 小时前
储能系统(EMS)核心架构解析:充放电控制、防逆流、防过载与 PID 调节
linux·运维·架构
志栋智能6 小时前
超自动化运维的终极目标:让系统自治运行
运维·网络·人工智能·安全·自动化
3GPP仿真实验室7 小时前
【MATLAB源码】CSI-RS:测量链路
linux·网络·matlab
阿 才7 小时前
WSL2 + TFTP + 网络启动(Linux开发板与WSL2建立网络连接)
linux·运维·网络