전체 글 189

Python에서 __future__ 모듈의 기능

python2버전에서 3버전으로 업데이트되면서 몇몇의 문법이나 기능이 달라졌다. 구버전 Python2에서도 상위버전 Python3의 기능을 사용할 수 있게 해주는 모듈 https://docs.python.org/3/library/__future__.html __future__ — Future statement definitions — Python 3.11.0 documentation __future__ — Future statement definitions Source code: Lib/__future__.py __future__ is a real module, and serves three purposes: To avoid confusing existing tools that analyze import..

Programming/python 2022.11.14

DRI (Detection, Recognition, Identification의 차이)

"Detection" - 어떤 객체가 있는지 없는지, 어디에 있는지 검출하는 것 - ex) 사진 속에 어떤 객체가 있다. O/X "Recognition" - 해당 객체가 어떤 객체인지 인식하는 것 - 어떤 class인지 구별해내는 것 - ex) 사진 속에 객체는 강아지이다. "Identification" - 그 객체가 어떤 특징을 가지고 있는지 이해하는 것 - ex) 사진 속에 강아지가 목줄을 매고 산책을 하고 있다.

AI/Computer Vision 2022.11.12

[CUDA error] out of memory 문제 해결 방법

https://discuss.pytorch.kr/t/cuda-out-of-memory/55/3 cuda out of memory 오류 해결 원본이라고 생각되는 GitHub - hanyoseob/youtube-cnn-002-pytorch-unet: [CNN PROGRAMMING] 002 - UNET 를 돌려보니 제 머신에서 batch 4에서 약 6G, batch 1에서 4.3G 정도 사용되네요. 올려주신 코드도 4.3G 정도네요. CUDA 버 discuss.pytorch.kr 1. 발생 문제 - CUDA out of memory 에러메시지 출력 2. 상황 - train model이 한번 잘 돌아가고 같은 runtime에 한번 더 train을 돌리면 에러가 발생하면서 GPU에 추가 process가 생기는 것..

Programming/errors 2022.11.10

[CUDA error] : CUBLAS_STATUS_ALLOC_FAILED

CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)` (jupyter lab 환경에서 작업) 구글링을 통해 얻은 해결방법 1) 배치사이즈를 줄이고, 코드를 다시 restart시키면 작동하는 것을 확인했다. - 하지만 기존에 잘 돌아가던 코드에서 갑자기 저런 에러가 발생하여 당황스럽다... 2) 배치사이즈를 줄여도 해결되지 않는 경우도 있다. (사실 저 에러는 배치사이즈와 관련이 없다는 사실) https://stackoverflow.com/questions/61473330/cuda-error-cublas-status-alloc-failed-when-calling-cublascreatehandle

Programming/errors 2022.11.10