삽질 기록
-
mount.davfs 할 때 마운트 할 폴더를 미리 만들어줘야함
mount.davfs: can't evaluate path of mount point (null)mount.davfs 할 때 마운트 할 폴더를 미리 만들어줘야함
2023.04.18 -
Docker 환경에서 윈도우를 띄우려고 할 때 (e.g. OpenCV, OpenGL, ...) 아래와 같은 에러가 발생한다면, GLFWError: (65544) b'X11: Failed to open display unix:1' host의 XServer를 볼륨 형태로 컨테이너로 공유해야하며, DISPLAY 환경 변수도 전달해주면 된다. 아래와 같이 docker container 를 생성할 때 아래와 같은 명령어를 같이 써줘서 만들어주면 된다. --volume /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=unix$DISPLAY 참고자료 : https://conservative-vector.tistory.com/entry/docker에서-컨테이너-gui-실행하기 docker..
Docker 환경에서 GLFWError: (65544) b'X11: Failed to open display unix:1'Docker 환경에서 윈도우를 띄우려고 할 때 (e.g. OpenCV, OpenGL, ...) 아래와 같은 에러가 발생한다면, GLFWError: (65544) b'X11: Failed to open display unix:1' host의 XServer를 볼륨 형태로 컨테이너로 공유해야하며, DISPLAY 환경 변수도 전달해주면 된다. 아래와 같이 docker container 를 생성할 때 아래와 같은 명령어를 같이 써줘서 만들어주면 된다. --volume /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=unix$DISPLAY 참고자료 : https://conservative-vector.tistory.com/entry/docker에서-컨테이너-gui-실행하기 docker..
2022.08.11 -
iteration 20 마다 결과 값(time, loss 등)을 확인하며 모델을 학습하고 있는데, iter=20 당 속도가 2배나 느려진 것을 발견하였다. 단순히 데이터 세트가 더 많이 추가되어 그런줄 알고있었는데, 아무리 생각해도 이상해서 이전에 데이터를 이 정도 양으로 많게끔 학습했던 적이 있었을 때의 로그를 확인해보니 시간 차이가 다소 있었다. 그래서 이상해서 찾아보던중.. 불현듯 며칠전 실험 시 바꿨었던 num_workers 가 생각났다....아... num_workers 디폴트 값인 0으로 두고 학습을 진행시켰었는데, 이것 때문에 데이터 로드 시 속도 저하(이전 보다)가 있었던 것 같다. 그래서 바로 num_workers 값을 GPU * 4 로 설정해주니 이전과 같이 빠르게 학습이 진행되는 것을..
num_workers 미설정 시 학습 데이터 로드 속도 영향 발생iteration 20 마다 결과 값(time, loss 등)을 확인하며 모델을 학습하고 있는데, iter=20 당 속도가 2배나 느려진 것을 발견하였다. 단순히 데이터 세트가 더 많이 추가되어 그런줄 알고있었는데, 아무리 생각해도 이상해서 이전에 데이터를 이 정도 양으로 많게끔 학습했던 적이 있었을 때의 로그를 확인해보니 시간 차이가 다소 있었다. 그래서 이상해서 찾아보던중.. 불현듯 며칠전 실험 시 바꿨었던 num_workers 가 생각났다....아... num_workers 디폴트 값인 0으로 두고 학습을 진행시켰었는데, 이것 때문에 데이터 로드 시 속도 저하(이전 보다)가 있었던 것 같다. 그래서 바로 num_workers 값을 GPU * 4 로 설정해주니 이전과 같이 빠르게 학습이 진행되는 것을..
2022.04.25 -
vim 으로 원격서버에 있는 코드 편집중이였는데 습관적으로 ctrl+s 를 누르다보니 터미널이 멈추는 현상이 발생하여 검색해보았다. 스크롤 락 건거라고 한다. ctrl+Q 누르면 다시 움직인다. 그리고 편집중에 터미널을 꺼버리면 .swp 확장자 파일이 생겨서 자꾸 다시 편집 할 때 마다 E325: ATTENTION 에러가 뜨니까 아래 블로그를 참고하여 해결하길 바란다. 요약하면 아래와 같다. .swp 파일 확인 -> 다른 프로세스가 작업중인지 확인 -> 사용안하면 파일 저장(wq) -> rm ~~.swp 삭제 E325: ATTENTION 해결 방법 https://clear-sky-sun.tistory.com/23 E325: ATTENTION vi swap 해결 방법 Linux vi을 통하여 작업을 하던 ..
vim 편집 시 ctrl+s 눌렀을 때 터미널 멈추는 현상vim 으로 원격서버에 있는 코드 편집중이였는데 습관적으로 ctrl+s 를 누르다보니 터미널이 멈추는 현상이 발생하여 검색해보았다. 스크롤 락 건거라고 한다. ctrl+Q 누르면 다시 움직인다. 그리고 편집중에 터미널을 꺼버리면 .swp 확장자 파일이 생겨서 자꾸 다시 편집 할 때 마다 E325: ATTENTION 에러가 뜨니까 아래 블로그를 참고하여 해결하길 바란다. 요약하면 아래와 같다. .swp 파일 확인 -> 다른 프로세스가 작업중인지 확인 -> 사용안하면 파일 저장(wq) -> rm ~~.swp 삭제 E325: ATTENTION 해결 방법 https://clear-sky-sun.tistory.com/23 E325: ATTENTION vi swap 해결 방법 Linux vi을 통하여 작업을 하던 ..
2022.04.13 -
TensorFlow Lite 파일을 interpreter로 읽어들이는데 다음과 같은 Warning 이 자꾸 떴다. /home/name/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /home/name/.local/lib/python3.6/site-..
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecatedTensorFlow Lite 파일을 interpreter로 읽어들이는데 다음과 같은 Warning 이 자꾸 떴다. /home/name/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /home/name/.local/lib/python3.6/site-..
2022.02.23 -
FCOS Install 또는 MaskRCNN install 과정 중 deform_conv_cuda.cu 파일에서 AT_CHECK 를 못찾는다는 에러가 자꾸 났었다. fcos_core/csrc/cuda/deform_conv_cuda.cu(72): error: identifier "AT_CHECK" is undefined 이 때 deform_conv_cuda.cu 파일에서 아래와 같이 정의해주면 된다. #ifndef AT_CHECK #define AT_CHECK TORCH_CHECK #endif 참고자료 : https://github.com/mrlooi/rotated_maskrcnn/issues/31#issuecomment-631416601 Hi, this project won't compile becaus..
identifier "AT_CHECK" is undefinedFCOS Install 또는 MaskRCNN install 과정 중 deform_conv_cuda.cu 파일에서 AT_CHECK 를 못찾는다는 에러가 자꾸 났었다. fcos_core/csrc/cuda/deform_conv_cuda.cu(72): error: identifier "AT_CHECK" is undefined 이 때 deform_conv_cuda.cu 파일에서 아래와 같이 정의해주면 된다. #ifndef AT_CHECK #define AT_CHECK TORCH_CHECK #endif 참고자료 : https://github.com/mrlooi/rotated_maskrcnn/issues/31#issuecomment-631416601 Hi, this project won't compile becaus..
2021.08.02 -
mmdetection 으로부터 학습한 딥러닝 모델을 ONNX 모델로 변환하고, TensorRT 로 변환하는 과정에서 아래와 같이 importTopK 레이어(노드)를 TensorRT 에서 인식을 못하여 변환이 안되는 문제가 발생하였다. In node -1 (importTopK): UNSUPPORTED_NODE: Assertion failed: inputs.at(1).is_weights() ERROR: builtin_op_importers.cpp:3455 In function importTopK: [8] Assertion failed: inputs.at(1).is_weights() mmdetection 에서는 아래와 같이 여러 TensorRT Plugin 을 제공하고 있다. 아마 이 플러그인들을 처리하는 과..
mmdetection 으로부터 학습한 모델을 ONNX 및 TensorRT 로 변환 시 나타나는 문제mmdetection 으로부터 학습한 딥러닝 모델을 ONNX 모델로 변환하고, TensorRT 로 변환하는 과정에서 아래와 같이 importTopK 레이어(노드)를 TensorRT 에서 인식을 못하여 변환이 안되는 문제가 발생하였다. In node -1 (importTopK): UNSUPPORTED_NODE: Assertion failed: inputs.at(1).is_weights() ERROR: builtin_op_importers.cpp:3455 In function importTopK: [8] Assertion failed: inputs.at(1).is_weights() mmdetection 에서는 아래와 같이 여러 TensorRT Plugin 을 제공하고 있다. 아마 이 플러그인들을 처리하는 과..
2021.07.26 -
아래와 같은 에러 발생 시 libpq-dev 패키지를 설치해주면 해결된다. fatal error: libpq-fe.h: No such file or directory $ sudo apt-get install libpq-dev 위와 같이 설치를 진행했는데 아래와 같이 dependency 문제가 나온다면, 해당 패키지를 dependency 에 맞게 재설치 해준다. The following packages have unmet dependencies: libpq-dev : Depends: libpq5 (= 10.3-1) but 13.3-1.pgdg18.04+1 is to be installed Reading package lists... Done Building dependency tree Reading sta..
fatal error: libpq-fe.h: No such file or directory아래와 같은 에러 발생 시 libpq-dev 패키지를 설치해주면 해결된다. fatal error: libpq-fe.h: No such file or directory $ sudo apt-get install libpq-dev 위와 같이 설치를 진행했는데 아래와 같이 dependency 문제가 나온다면, 해당 패키지를 dependency 에 맞게 재설치 해준다. The following packages have unmet dependencies: libpq-dev : Depends: libpq5 (= 10.3-1) but 13.3-1.pgdg18.04+1 is to be installed Reading package lists... Done Building dependency tree Reading sta..
2021.07.15 -
weight 파일을 load 하지 않고 테스트 시 model 구조만 불러와서 inferece 하기 때문에 분류 결과는 class A : 0.54, class B : 0.46 이런식의 값이 산출되게 된다. 반드시 weight 파일을 load 할 때 path 를 잘 지정해주어야 하며, (예외 처리도 반드시 해야함) load_state_dict(checkpoint['state_dict'] 을 꼭 해주어야한다.
Image Classification 시 분류 결과 한쪽에 치우쳐져서 나오는 현상weight 파일을 load 하지 않고 테스트 시 model 구조만 불러와서 inferece 하기 때문에 분류 결과는 class A : 0.54, class B : 0.46 이런식의 값이 산출되게 된다. 반드시 weight 파일을 load 할 때 path 를 잘 지정해주어야 하며, (예외 처리도 반드시 해야함) load_state_dict(checkpoint['state_dict'] 을 꼭 해주어야한다.
2021.07.01 -
아래와 같은 식으로 Linux 환경에서 OpenCV(C++)의 VideoCapture 클래스를 사용하여 Webcam을 사용하고자 할 때 웹캠이 read 되지 않는 문제가 있다. VideoCapture cap; // open the default camera using default API cap.open(0); 그럴 땐 먼저 웹캠 USB가 제대로 꽂혀있는지 확인한 뒤, 디바이스가 제대로 연결 되었는지 아래와 같이 확인해보고, ffplay를 사용하여 웹캠이 정상 동작하는지 확인해본다. 그 전에 연결되어있는 카메라의 device 명을 아래와 같이 확인해야한다. $ v4l2-ctl --list-devices ffplay를 사용하여 연결되어있는 Webcam 을 테스트 하는 명령어는 아래와 같다. $ ffplay..
Linux 환경에서 OpenCV의 VideoCapture 사용 시 Webcam이 죽어도 읽히지 않을 때아래와 같은 식으로 Linux 환경에서 OpenCV(C++)의 VideoCapture 클래스를 사용하여 Webcam을 사용하고자 할 때 웹캠이 read 되지 않는 문제가 있다. VideoCapture cap; // open the default camera using default API cap.open(0); 그럴 땐 먼저 웹캠 USB가 제대로 꽂혀있는지 확인한 뒤, 디바이스가 제대로 연결 되었는지 아래와 같이 확인해보고, ffplay를 사용하여 웹캠이 정상 동작하는지 확인해본다. 그 전에 연결되어있는 카메라의 device 명을 아래와 같이 확인해야한다. $ v4l2-ctl --list-devices ffplay를 사용하여 연결되어있는 Webcam 을 테스트 하는 명령어는 아래와 같다. $ ffplay..
2021.06.25 -
아래와 같은 에러시 RuntimeError: Input type (torch.cuda.DoubleTensor) and weight type (torch.cuda.FloatTensor) should be the same x = x.to(device).float() .float() 사용하여 해결한다. 참고자료 : https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=chrhdhkd&logNo=221469768189 pytorch : RuntimeError 발생시 해결방법(Input type and weight type should be the same) 발생한 에러 : RuntimeError: Input type (torch.cuda.Dou..
Input type (torch.cuda.DoubleTensor) and weight type (torch.cuda.FloatTensor) should be the same아래와 같은 에러시 RuntimeError: Input type (torch.cuda.DoubleTensor) and weight type (torch.cuda.FloatTensor) should be the same x = x.to(device).float() .float() 사용하여 해결한다. 참고자료 : https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=chrhdhkd&logNo=221469768189 pytorch : RuntimeError 발생시 해결방법(Input type and weight type should be the same) 발생한 에러 : RuntimeError: Input type (torch.cuda.Dou..
2021.06.24 -
아래와 같이 vnc server 를 연결했을 때 회색 화면으로 뜨는 문제가 발생한다. 실행될 Application 이 아무것도 없어서 뜨는 문제이다. ~/.vnc/xstartup 파일을 수정해주면 된다. 0. process kill 해당 번호를 지워주면 된다. vncserver -kill :2 1. 패키지 설치 sudo apt install gnome-session-flashback 2. ~/.vnc/xstartup 내용 변경 vi ~/.vnc/xstartup #!/bin/sh # Uncomment the following two lines for normal desktop: # unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xsta..
Ubuntu 18.04 환경에서 VNC Server 설정했을 때 회색 화면 나타나는 문제아래와 같이 vnc server 를 연결했을 때 회색 화면으로 뜨는 문제가 발생한다. 실행될 Application 이 아무것도 없어서 뜨는 문제이다. ~/.vnc/xstartup 파일을 수정해주면 된다. 0. process kill 해당 번호를 지워주면 된다. vncserver -kill :2 1. 패키지 설치 sudo apt install gnome-session-flashback 2. ~/.vnc/xstartup 내용 변경 vi ~/.vnc/xstartup #!/bin/sh # Uncomment the following two lines for normal desktop: # unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xsta..
2021.06.11 -
pytorch 에서의 input tensor 에서 주어진 k 값에 따라 가장 큰 값 k 개를 찾는 함수이다. image classification 에서 train/validation 시 accuracy 측정할 때 자주 사용된다. 아래와 같은 에러는 TopK 범위를 잘못 지정하였을 때 나는 에러이다. RuntimeError: invalid argument 5: k not in range for dimension at /pytorch/aten/src/THC/generic/THCTensorTopK.cu:26 RuntimeError: invalid argument 5: k not in range for dimension at /pytorch/aten/src/THC/generic/THCTensorTopK.cu:2..
Pytorch 에서의 TopK error (k not in range for dimension)pytorch 에서의 input tensor 에서 주어진 k 값에 따라 가장 큰 값 k 개를 찾는 함수이다. image classification 에서 train/validation 시 accuracy 측정할 때 자주 사용된다. 아래와 같은 에러는 TopK 범위를 잘못 지정하였을 때 나는 에러이다. RuntimeError: invalid argument 5: k not in range for dimension at /pytorch/aten/src/THC/generic/THCTensorTopK.cu:26 RuntimeError: invalid argument 5: k not in range for dimension at /pytorch/aten/src/THC/generic/THCTensorTopK.cu:2..
2021.05.10 -
VNC Viewer 에서 Pycharm 실행 시 아래와 같이 X11 window server 에 연결하지 못한다는 에러가 난다. Can't connect to X11 window server using 'localhost:2.0' as the value of the DISPLAY variable. 이와 관련된 해결법으로 $DISPLAY 변수를 지정해주는 방법들이 나왔는데, 아래와 같이 먼저 xhost + 명령어를 실행해주면 된다. 이 때 root 권한으로 아래와 같이 실행해준다. 이는 Xwindow의 모든 창들은 Owner(root)의 허락없이 열수 있다는 의미이다. $ xhost + 그 다음 local 환경에서 pycharm.sh 를 실행하면 실행이 정상적으로 된다. 참고자료 1 : xinet.kr/?..
VNC viewer 에서 Pycharm 실행 시 DISPLAY 문제VNC Viewer 에서 Pycharm 실행 시 아래와 같이 X11 window server 에 연결하지 못한다는 에러가 난다. Can't connect to X11 window server using 'localhost:2.0' as the value of the DISPLAY variable. 이와 관련된 해결법으로 $DISPLAY 변수를 지정해주는 방법들이 나왔는데, 아래와 같이 먼저 xhost + 명령어를 실행해주면 된다. 이 때 root 권한으로 아래와 같이 실행해준다. 이는 Xwindow의 모든 창들은 Owner(root)의 허락없이 열수 있다는 의미이다. $ xhost + 그 다음 local 환경에서 pycharm.sh 를 실행하면 실행이 정상적으로 된다. 참고자료 1 : xinet.kr/?..
2021.05.10 -
docker docker pull 사용 시 아래와 같이 에러 나는 경우가 있다. Error response from daemon: Head https://~~~~: unauthorized: authentication required 아래와 같이 해결하면 된다. 1. 아래 사이트에서 엔비디아 계정과 같은 계정으로 로그인 (API key 를 생성하여 사용 필요) ngc.nvidia.com/ NVIDIA NGC ngc.nvidia.com 2. API key 는 안전한 곳에 저장 3. 도커 로그인 $ docker login nvcr.io Username: $oauthtoken Password: [API KEY] 4. 원하는 이미지 다운받기 $ docker pull nvcr.io/nvidia/pytorch:19...
docker 에서 authentication required 문제docker docker pull 사용 시 아래와 같이 에러 나는 경우가 있다. Error response from daemon: Head https://~~~~: unauthorized: authentication required 아래와 같이 해결하면 된다. 1. 아래 사이트에서 엔비디아 계정과 같은 계정으로 로그인 (API key 를 생성하여 사용 필요) ngc.nvidia.com/ NVIDIA NGC ngc.nvidia.com 2. API key 는 안전한 곳에 저장 3. 도커 로그인 $ docker login nvcr.io Username: $oauthtoken Password: [API KEY] 4. 원하는 이미지 다운받기 $ docker pull nvcr.io/nvidia/pytorch:19...
2021.03.08 -
/usr/bin/ld: cannot find -luuid 에러 발생 시 sudo apt-get install uuid-dev 참고자료 : www.programmersought.com/article/5373747707/ The solution to the -llzo2 and -luuid problems occurred during the android source code compilation process - Programmer Sought forward from:http://blog.csdn.net/hhwahzl/article/details/46520137 1. The following error occurred during the compilation process: lzo/lzo1x.h: No su..
/usr/bin/ld: cannot find -luuid/usr/bin/ld: cannot find -luuid 에러 발생 시 sudo apt-get install uuid-dev 참고자료 : www.programmersought.com/article/5373747707/ The solution to the -llzo2 and -luuid problems occurred during the android source code compilation process - Programmer Sought forward from:http://blog.csdn.net/hhwahzl/article/details/46520137 1. The following error occurred during the compilation process: lzo/lzo1x.h: No su..
2021.02.15 -
pip install pytube 명령어를 통해 pytube 패키지를 깔고 유튜브 영상 크롤링을 하려는데 어떤 영상은 정상으로 다운로드되고 또 어떤 영상은 아래와 같은 에러가 발생해서 AttributeError: 'NoneType' object has no attribute 'download' pip install pytube3 명령어를 통해 pytube 패키지를 깔았더니 아래와 같은 에러가 발생하였다. pytube.exceptions.RegexMatchError: get_ytplayer_config: could not find match for config_patterns ../pytube/extract.py 에서 config_patterns 을 바꿔보기도 했지만 소용 없어서 아래와 같이 github ..
pytube 를 이용하여 youtube 영상 크롤링 시 발생하는 문제pip install pytube 명령어를 통해 pytube 패키지를 깔고 유튜브 영상 크롤링을 하려는데 어떤 영상은 정상으로 다운로드되고 또 어떤 영상은 아래와 같은 에러가 발생해서 AttributeError: 'NoneType' object has no attribute 'download' pip install pytube3 명령어를 통해 pytube 패키지를 깔았더니 아래와 같은 에러가 발생하였다. pytube.exceptions.RegexMatchError: get_ytplayer_config: could not find match for config_patterns ../pytube/extract.py 에서 config_patterns 을 바꿔보기도 했지만 소용 없어서 아래와 같이 github ..
2020.12.28 -
unknown filesystem type 'exfat' 위와 같이 exfat 포맷의 외장하드가 우분투 환경에서 마운트가 안될 때 아래와 같이 패키지를 설치해주면 된다. $ sudo apt-get install exfat-fuse exfat-utils
Ubuntu 환경에서 exfat 포맷의 외장하드 마운트 안될 때unknown filesystem type 'exfat' 위와 같이 exfat 포맷의 외장하드가 우분투 환경에서 마운트가 안될 때 아래와 같이 패키지를 설치해주면 된다. $ sudo apt-get install exfat-fuse exfat-utils
2020.12.14 -
에러 환경 Windows 10 64bits CUDA 10.2 cudnn 8.0 TensorRT 7.2.1.6 Visual Studio 2019 위와 같은 환경에서 TensorRT 를 사용했을 때 cublas 와 관련된 에러가 다음과 같이 발생했었다. Assertion failed: cublasStatus == CUBLAS_STATUS_SUCCESS C:\source\rtSafe\cublas\cublasLtWrapper.cpp:279 Aborting... Builder timing cache: created 395 entries, 722 hit(s) C:\source\rtSafe\cublas\cublasLtWrapper.cpp (279) - Assertion Error in nvinfer1::CublasL..
cublasStatus == CUBLAS_STATUS_SUCCESS에러 환경 Windows 10 64bits CUDA 10.2 cudnn 8.0 TensorRT 7.2.1.6 Visual Studio 2019 위와 같은 환경에서 TensorRT 를 사용했을 때 cublas 와 관련된 에러가 다음과 같이 발생했었다. Assertion failed: cublasStatus == CUBLAS_STATUS_SUCCESS C:\source\rtSafe\cublas\cublasLtWrapper.cpp:279 Aborting... Builder timing cache: created 395 entries, 722 hit(s) C:\source\rtSafe\cublas\cublasLtWrapper.cpp (279) - Assertion Error in nvinfer1::CublasL..
2020.12.01 -
Problem: AttributeError: module 'tensorflow' has no attribute 'io' Solution : pip install tensorflow Reference : github.com/thu-ml/tianshou/issues/39 AttributeError: module 'tensorflow' has no attribute 'io' · Issue #39 · thu-ml/tianshou I have marked all applicable categories: exception-raising bug RL algorithm bug documentation request (i.e. "X is missing from the documentation.") new feature ..
AttributeError: module 'tensorflow' has no attribute 'io'Problem: AttributeError: module 'tensorflow' has no attribute 'io' Solution : pip install tensorflow Reference : github.com/thu-ml/tianshou/issues/39 AttributeError: module 'tensorflow' has no attribute 'io' · Issue #39 · thu-ml/tianshou I have marked all applicable categories: exception-raising bug RL algorithm bug documentation request (i.e. "X is missing from the documentation.") new feature ..
2020.11.05