검색하기 귀찮아서 블로그에 박제
-
cv2.error: When the input arrays in add/subtract/multiply/divide functions have different types, the output array type must be explicitly specified in function "arithm_op"검색하기 귀찮아서 블로그에 박제 2024. 3. 8. 02:25
cv2.addWeighted(image, 1, overlay, 0.3, 0) -> cv2.addWeighted(image, 1, overlay, 0.3, 0, dtype=cv2.CV_64F) cv2.addWeighted(image, 1, overlay, 0.3, 0, dtype=cv2.CV_64F) 이렇게 데이터 타입을 명시해주면 된다
-
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)검색하기 귀찮아서 블로그에 박제 2024. 1. 15. 21:55
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) #SIGSEGV는 "세그먼트 결함"을 나타내는데 프로세스에서 매핑되지 않은 메모리 주소를 읽거나 쓸 때를 말한다. PyCharm 디버깅 시 오류가 났는데 step over로 넘기지 않고 그냥 실행으로 optimizer.step()부분을 넘어가니까 잘 작동이 되었다. 알고보니 PyCharm의 유명한 Issue 중 하나였다. 아래의 방법은 복잡하니 나처럼 그냥 넘어가는 것도 하나의 방법..! 문제 원인 Python 스크립트에 버그가 있거나 타사 코드에 버그가 있는 경우 로드 중인 모듈 코드를 깨는 오래된 버전의 모듈 다른 사람이 여는 파일과 상호 작용(읽기/쓰기) 시도 Python..
-
RuntimeError: Trying to backward through the graph a second time검색하기 귀찮아서 블로그에 박제 2024. 1. 15. 15:36
RuntimeError: Trying to backward through the graph a second time (or directly access saved tensors after they have already been freed). Saved intermediate values of the graph are freed when you call .backward() or autograd.grad(). Specify retain_graph=True if you need to backward through the graph a second time or if you need to access saved tensors after calling backward. 라는 에러가 발생. 원인 : backwa..
-
RuntimeError: The detected CUDA version (10.1) mismatches the version that was used to compile PyTorch (11.3). Please make sure to use the same CUDA versions검색하기 귀찮아서 블로그에 박제 2023. 7. 13. 14:06
RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda)) 가상환경에서 nvcc -V 했을 때 버전이 안바껴서 그럼 (base)환경에서의 버전이 보임 그래서 nvcc 버전을 바꿔줘야함 $vi ~/.bashrc 마지막에 추가 export CUDA_HOME="/usr/local/cuda-11.2" export LD_LIBRARY_PATH="/usr/local/cuda-11.2/lib64:$LD_LIBRARY_PATH" export PATH="/usr/local/cuda-11.2/bin:$PATH" $source ~/.bashrc
-
Python 여러버전 설치하기검색하기 귀찮아서 블로그에 박제 2022. 7. 8. 18:43
난 기존에 python3.8이 설치되어있었음 tensorflow1.x를 사용하기위해 낮은 버전 파이썬을 설치했음 https://www.python.org/downloads/ Download Python The official home of the Python Programming Language www.python.org 원하는 버전의 python링크를 복사한다 (Gzipped source) # 설치 $ wget https://www.python.org/ftp/python/3.7.13/Python-3.7.13.tgz $ tar -xvzf Python-3.7.13.tgz $ cd Python-3.7.13 # 종속성부여 $ sudo apt dist-upgrade $ sudo apt install build-..