본문 바로가기

Programming Language9

[Pytorch] "RuntimeError: CUDA error: an illegal memory access was encountered" 에러 발생 시 * 에러 파이토치에서 텐서를 gpu로 옮겨주는 과정인 .to(device)를 실행하면 아래와 같은 에러 발생 에러가 어디서 발생했는지 확인하기 위해, 다음 환경변수를 설정 CUDA_LAUNCH_BLOCKING=1 * 해결 방법 터미널에 다음 명령어 입력 export TORCH_CUDNN_V8_API_DISABLED=1 * Reference https://github.com/pytorch/pytorch/issues/99372 PyTorch 2.0.0 encountered CUDA error: an illegal memory access was encountered · Issue #99372 · pytorch/pytorch 🐛 Describe the bug Running PyTorch 2.0.0 encoun.. 2023. 12. 12.
[Python] 유용한 string 출력 방법 정리 1. 콤마 활용 - 여러 스트링을 콤마(,)로 구별하여 출력 가능 - 간단하게 출력 가능 2. 문자열 포매팅 - % 기호를 활용하여 출력 - C와 유사한 스타일 - 정수 : %d, 실수 : %f, 문자열 : %s 2023. 10. 29.
[Python] Install mmcv * Environment Ubuntu 20.04 python 3.8.10 pip 20.0.2 (python 3.8) * Installation pip install mmcv-full==1.2.2 -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6.0/index.html * Reference https://github.com/MengyangPu/EDTER/issues/64 2023. 7. 27.
ModuleNotFoundError: No module named 'easydict' * 해결방법 conda install easydict -c conda-forge https://stackoverflow.com/questions/47449723/trouble-installing-easydict-package-from-conda-prompt Trouble installing 'easydict' package from conda prompt I am trying to install easydict package from conda prompt using following command conda install easydict But I am getting the following error PackageNotFoundError: Packages missing in current stacko.. 2023. 5. 14.