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

相关推荐
尤老师FPGA7 小时前
petalinux修改设备树添加vdma生成linux系统
android·linux·运维
yxy___7 小时前
达梦分布式集群DPC_重做副本-操作指南(DEM)_yxy
运维·分布式
月山知了7 小时前
linux kernel component子系统:基于rk3588 Android 14 kernel-6.1 display-subsystem代码分析
android·linux·运维
_Emma_7 小时前
【QCOM】 Linux下qcom venus 编解码驱动框架分析
linux·驱动开发·视频编解码
星辰徐哥7 小时前
大模型工程化部署:Docker Compose批量部署
运维·docker·容器
SEO-狼术7 小时前
Support Network Diagnostics in .NET
运维·服务器·网络
AI周红伟7 小时前
AI自动盯盘与定时行情分析:OpenClaw股票辅助Agent集成完整使用指南-周红伟
运维·服务器·人工智能·音视频·火山引擎
不才小强8 小时前
Linux系统常用命令
linux·运维·网络
SPC的存折9 小时前
8、Ansible之Playbook---Roles
linux·服务器·ansible
Kira Skyler9 小时前
BPF KPROBE编程中的ctx是什么?
linux