[TensorRT] TensorRT custom layer
예를 들어, "ResizeBilinear" 레이어는 TensorRT 에서 지원하지 않는 레이어이다. TensorRT에서 지원되지 않는 레이어 목록 : https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#support_op TensorRT Developer Guide :: Deep Learning SDK Documentation NVIDIA DLA (Deep Learning Accelerator) is a fixed function accelerator engine targeted for deep learning operations. DLA is designed to do full hardware acceleration ..
2019.06.13
[Linux] nohub 명령어 이용해서 백그라운드로 실행하기
명령어 뒤에 & 을 붙이면 백그라운드로 실행하게 되는데 이 때, 터미널을 종료하면 프로세스도 같이 종료되기 때문에 nohup 명령어를 사용하여 백그라운드로 실행해야한다. nohup ./test.sh & 참고자료 : http://changpd.blogspot.com/2013/04/linux-nohup-xxxsh.html [linux] 백그라운드 작업 nohup [xxx.sh] & 백그라운드 작업이 필요할 경우가 있을 수 있다. 1. 데몬형태로 뭐를 띄운다거나, 2. cpu 많이 안잡아먹는데, 실행이 겁나 오래 걸리는. (예를들면, 10g짜리 압축을 푼다거나 뭐 이런거. ㅋ ) 보통 명령어 뒤에 & 만 붙여도 백그라... changpd.blogspot.com
2019.06.10
[TensorRT] ImportError: No module named 'tensorrt.parsers'; 'tensorrt' is not a package
아래와 같은 에러는 ImportError: No module named 'tensorrt.parsers'; 'tensorrt' is not a package TensorRT 예제에서 아래코드와 같이 tensorrt.parsers 의 uffparser를 import 하여 uff 파일을 로드하고 builder 를 생성하였을 때 나는 에러이다. import tensorflow as tf import tensorrt as trt from tensorrt.parsers import uffparser uff_model = uff.from_tensorflow(tf_model, ["fc2/Relu"]) G_LOGGER = trt.infer.ConsoleLogger(trt.infer.LogSeverity.ERROR) p..
2019.06.10
docker 에서 cannot connect to X server unix:0
docker 환경에서 opencv 를 이용하여 새로운 창을 띄울 경우 아래와 같은 에러가 발생한다. cannot connect to X server unix:0 이는 도커를 만들 때 설정해주고, docker가 돌고있는 로컬 환경에서 아래와 같은 명령어를 통해 해결한다. 해결법 1. $ xhost local:root 출처 1 : https://askubuntu.com/questions/175611/cannot-connect-to-x-server-when-running-app-with-sudo Cannot connect to X Server when running app with sudo When I am running some software using sudo command it showing error..
2019.06.10
no image
[책] 밑바닥부터 시작하는 딥러닝 2
드디어 기다렸던 밑바닥부터 시작하는 딥러닝 2 책이 5월에 출간되었기 때문에, 리뷰해보고자 한다. 밑바닥부터 시작하는 딥러닝 1은 기초적인 "파이썬"에 초점을 맞춰 초보자들이 딥러닝에 입문 할 수 있게 도와준 책이라면, 이번에 새로이 출간된 밑바닥부터 시작하는 딥러닝 2는 "순환신경망"과 "자연어처리"에 입문하기 위한 기초적인 지식들을 담았다. 밑바닥부터 시작하는 딥러닝 1과 2 모두 "밑바닥부터" 시작하고자 하는 이들에게 도움을 주고자 하는 방향은 변치 않았다. 책에서 배울 수 있는 기술들은 다음과 같다. 파이썬을 이용한 텍스트 처리 딥러닝 등장 이전의 단어 표현 방법 단어 벡터를 얻기 위한 word2vec 대규모 데이터의 학습을 고속화 하는 네거티브 샘플링 시계열 데이터를 처리하는 RNN, LSTM,..
2019.06.08
no image
[TensorFlow] pb 파일 TensorBoard에 띄우기 (TF 1.x 버전용)
import_pb_to_tensorboard.py # Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribute..
2019.05.31
[GitHub] GitHub 에 폴더 올리기
$ git init $ git remote add origin "repository address" $ git add . $ git status $ git commit -m "message" $ git push -u origin master git push 가 안되는 경우에는 git pull 을 통해 상태를 업데이트 한 후에 다시 git push
2019.05.31
[CUDA] CUDA Capability 확인
CUDA 를 설치하면 아래와 같은 경로에 접속하여 ./deviceQuery 라는 명령어로 CUDA 정보를 확인 할 수 있다. 필자의 경우는 cuda 10.0 버전을 설치하였으므로 아래와 같은 경로에 들어갔고, 다른 버전인 경우 숫자를 바꾸어 폴더에 진입한다. $ cd /usr/local/cuda-10.0/samples/1_Utilities/deviceQuery sudo make $ sudo make /usr/local/cuda-10.0/bin/nvcc -ccbin g++ -I../../common/inc -m64 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 ..
2019.05.31
[Git] fatal: Authentication failed
git 에 push를 아래와 같이 했을 때 $ git push -u origin master 아래와 같은 에러가 뜨면서 실패했다고 뜨면 Username for 'https://github.com': name Password for 'https://seohee@github.com': remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/name/name.git/' 설정하였던 origin을 삭제하고, 다시 git remote add origin "자신의 레포지토리" 를 설정해준다. $ git remote -v $ git remote remove origin $ git remote add origin ..
2019.05.31
terminate called after throwing an instance of 'nvinfer1::CudaError'
아래와 같은 에러는 2019-05-21 08:35:00.310722: E tensorflow/contrib/tensorrt/log/trt_logger.cc:38] DefaultLogger engine.cpp (99) - Cuda Error in initializeCommonContext: 4 (Could not initialize cudnn, please check cudnn installation.) terminate called after throwing an instance of 'nvinfer1::CudaError' what(): std::exception Aborted (core dumped) Session 돌릴 때 gpu memory 할당을 너무 높게 줘서 생긴 문제 일 수도 있다. with ..
2019.05.21
no image
[Python] Python 심볼릭 링크 설정
Python 은 버전 관리 하는 것이 필수이다. 나중에 Python Dependency 가 꼬여버리면 컴퓨터를 포맷하거나 일일히 꼬인 링크들을 제거해줘야하는 번거롭고 끔찍한 일이 발생한다. pip 도 마찬가지이다. 아래와 같이 각 버전을 확인해보길 바란다. $ pip -V $ pip2 -V $ pip3 -V $ python -V $ python2 -V $ python3 -V 리눅스에서 파이썬이 기본적으로 설치가 되어있지만, 원하는 버전이 있을 경우에 특별한 버전의 파이썬을 설치하고 그것을 주로 사용하기 위해서는 "심볼릭 링크" 를 설정해줘야한다. 가령 python test.py 를 실행하였을 때 python 기본 심볼릭 링크가 /usr/bin/python 이 /usr/bin/python2.7 을 가리키고..
2019.04.18
no image
[책] 텐서플로를 활용한 머신러닝
나는 한빛미디어의 '밑바닥부터 시작하는 딥러닝' 이라는 책을 통해서 '텐서플로우'를 처음 접하게 되었다. 밑바닥부터 시작하는 딥러닝 이라는 책은 처음 딥러닝을 입문하는 사람들에게 간단 명료하게 꼭 알아야 하는 것들만 콕콕 찝어서 친근하게 설명해주는 책이었다. 이 책이 나온 이후로부터 멸종 위기에 처한 동물들을 삽화로 그려낸 오라일리 표지를 쓰는 한빛미디어의 책들을 좋아하게 되었다. 한빛미디어에서 나오는 딥러닝 관련 서적들은 실무자 중심으로 상세한 설명과 코드를 제공하기 때문에 파이썬을 이용하는 딥러닝 개발자들에게 매력적으로 다가오는 것 같다. 이 외에도 핸즈온 머신러닝, 처음 배우는 머신러닝, 파이썬 라이브러리를 활용한 머신러닝, 골빈해커의 3분 딥러닝 이라는 책들을 읽었는데 이 중 파이썬 라이브러리 (..
2019.04.14