RuntimeError: CUDA error: no kernel image is available for execution on the device

When running the salient target detection code, an error is reported:
Insert image description here
My GPU version is NVIDIA GeForce RTX 3080 Ti. It may be that the pytorch version is not suitable. The Pytorch version I installed is 1.8.1,
Reinstall Pytorch 1.11 version, no more errors,

报了新的错误:
File “charset_normalizer/md.py”, line 5, in
ImportError: cannot import name ‘COMMON_SAFE_ASCII_CHARACTERS’ from ‘charset_normalizer.constant’ (/root/miniconda3/envs/ATSA/lib/python3.8/site-packages/charset_normalizer/constant.py)

Insert image description here

Insert image description here
Solution: Install chardet using the following command:

pip install chardet

Code runs successfully

Guess you like

Origin blog.csdn.net/qq_45257495/article/details/134358037