When running the salient target detection code, an error is reported:
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)
Solution: Install chardet using the following command:
pip install chardet
Code runs successfully