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

相关推荐
淼淼爱喝水2 分钟前
华为 防火墙直连互通配置:实现双防火墙 Ping 通
服务器·网络·华为
kyle~5 分钟前
Linux---nmcli (NetworkManager服务的核心命令行工具)
linux·运维·php
不愿透露姓名的大鹏7 分钟前
VMware vcenter报错no healthy upstream
linux·运维·服务器·vmware
zcongfly8 分钟前
绿联云+rustdesk+tailscale自建服务器通信
运维·服务器
攒了一袋星辰9 分钟前
类抖音的高并发评论盖楼系统
服务器·前端·数据库
xingyuzhisuan10 分钟前
怎么快速在云上部署一个Stable Diffusion环境?(实操落地版)
人工智能·stable diffusion·ai绘画·gpu算力
胡楚昊11 分钟前
Polar PWN (4)
linux·运维·算法
桌面运维家11 分钟前
虚拟化服务器备份恢复:快速切换方案详解
运维·服务器
nangonghen15 分钟前
centos 7.9安装hiclaw
linux·运维·centos
小李小李快乐不已15 分钟前
docker(2)容器管理与镜像操作
运维·c++·docker·容器