[TensorRT] Builder 에서의 UFF vs ONNX
환경 Ubuntu 16.04 Python 3.5 TensorRT 7.1.3.4 TensorFlow 1.13.1 및 1.15.1 TensorFlow 프레임워크를 이용하여 .pb 를 만든 뒤 convert-to-uff 유틸리티를 통해 .uff 파일로 변환하고나서 .uff 파일을 tensorrt engine 으로 변환하는데 input order 와 input value 그리고 input dimension 을 올바르게 설정했는데도 불구하고 자꾸 아래와 같은 에러가 떠서 [TensorRT] ERROR: UffParser: Parser error: tower_0/resnet_v1_50/conv1/BatchNorm/FusedBatchNorm: The input to the Scale Layer is required ..
2020.09.15
no image
[Python] 이미 존재하는 모듈 이름을 폴더 이름으로 사용하지 말 것
새 프로젝트를 만들고 있는 도중 tensorrt 를 import 하여 사용하는데 자꾸 아래와 같은 에러가 났다. File "../tensorrt/trt_lib.py", line 23, in load_cuda_engine_from_onnx TRT_LOGGER = trt.Logger(trt.Logger.WARNING) AttributeError: module 'tensorrt' has no attribute 'Logger' tensorrt 는 분명히 설치되어있고, 지금까지 잘 사용해 왔는데 갑자기 tensorrt 에는 Logger 가 없다니 ... 알고보니 이미 존재하는 모듈(설치한 모듈) 이름인 tensorrt 가 이미 존재하는데도 불구하고 새로 만든 폴더 이름을 tensorrt 로 지정했기 때문에 새로 ..
2020.09.10
The repository 'https://apt.dockerproject.org/repo ubuntu-xenial Release' does not have a Release file.
W: The repository 'https://apt.dockerproject.org/repo ubuntu-xenial Release' does not have a Release file. 한시간 내내 삽질하다가 아래와 같은 방법으로 해결함 sudo add-apt-repository "deb https://apt.dockerproject.org/repo/ $(cat /etc/issue | awk '{print $1}' | tr '[:upper:]' '[:lower:]')-$(lsb_release -cs) main" 참고자료 : https://askubuntu.com/questions/981031/sudo-apt-get-update-throwing-error
2020.07.06
sudo apt-get update 시 NO_PUBKEY 에러나는 문제
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://nvidia.github.io/nvidia-container-runtime/ubuntu16.04/amd64 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 키이름 위와 같이 linux 환경에서 sudo apt-get update 시, public key 를 사용할 수 없다는 에러가 발생하는데 .. 아래..
2020.07.06
C++ 환경에서 OpenCV 3.4.0 의 resize 사용 시 나타나는 문제
문제의 코드 cv::resize(_output, _output, cv::Size(dst_w, dst_h), cv::INTER_CUBIC); 위와 같이 double fx, double fy 의 인자를 넣지 않고 interpolation 옵션을 주면 안먹는다... (픽셀 값 확인함) 왜지? .... 보통 값 생략 하면 디폴트 값으로 들어가는 것이 아닌가 cv::INTER_CUBIC 의 값이 2로 들어가서 fx 값으로 대치된건가? ... 문제가 해결된 코드 cv::resize(_output, _output, cv::Size(dst_w, dst_h), 0, 0, cv::INTER_CUBIC); resize¶ Resizes an image. C++: void resize(InputArray src, OutputA..
2020.07.01
Visual Studio Code 에서 Tab 키 안될 때
Ctrl + M https://code.visualstudio.com/docs/getstarted/keybindings Visual Studio Code Key Bindings Here you will find the complete list of key bindings for Visual Studio Code and how to change them. code.visualstudio.com
2020.06.30
[TensorRT] Assertion `size >= bsize && "Mismatch between allocated memory size and expected size of serialized engine."'
아래와 같은 에러는 TensorRT 7.0 버전에서 만든 Engine 을 TensorRT 7.0 미만의 버전에서 사용하였을 때 나는 에러이다. 해당하는 TensorRT 버전에 맞게 끔 다시 Engine 을 생성해서 Deserialization 을 시도해야한다. python3: engine.cpp:868: bool nvinfer1::rt::Engine::deserialize(const void*, std::size_t, nvinfer1::IGpuAllocator&, nvinfer1::IPluginFactory*): Assertion `size >= bsize && "Mismatch between allocated memory size and expected size of serialized engine."..
2020.05.18
[Pytorch] torch.cuda.is_available() is False
에러 내용 RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU. CUDA 10.0 버전에서 Pytorch 1.3.0 이상의 버전을 썼을 때 torch.cuda.is_available() 이 자꾸 false 가 뜨는 현상을 맞이했다. CUDA 및 Nvidia driver 와 적절하게 맞는 Pytorch 버전을 사용하지 않아서 생기는 문제 ..
2020.04.17
[Linux] error mounting
error mounting /dev/sdb1 sudo ntfsfix /dev/sdb1 로 해결
2019.12.24
[TensorFlow] nvcc error : 'cudafe++' died with status 0xC0000005 (ACCESS_VIOLATION)
nvcc error : 'cudafe++' died with status 0xC0000005 (ACCESS_VIOLATION) TensorFlow 1.14 를 Bazel 로 소스 빌드 시 Visual C++ Build Tools 2015 이 설치되지 않았거나 or CUDA 10.0 의 버그로 인하여 생길 수 있는 에러이다. 설치되지 않았다면 해결법 1을, 설치되었다면 해결법 2를 참조 바람 해결법 1 : VS2015 뿐만 아니라 아래 두 가지가 모두 설치되어있는지 확인 해야한다. Microsoft Visual C++ 2015 재배포 가능 업데이트 3 Microsoft Build Tools 2015 업데이트 3 Visaul C++ Build Tools 2015 다운로드 : https://visualstud..
2019.12.09
[TensorFlow] model_pruner failed: Invalid argument: Invalid input graph, specified in either feed_devices or fetch_devices was not found in the Graph
2019-12-05 09:52:54.253515: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:502] model_p runer failed: Invalid argument: Invalid input graph. 2019-12- 05 09:52:54.527407: E Capture.cpp:833] Invalid argument: Tensor network_input:0, specified i n either feed_devices or fetch_devices was not found in the Graph 위와 같은 에러는 pb 파일을 TensorFlow Run 했을 때 pb 파일이 잘못되었거나, 입력 및 출력 노드의 이름이 잘못되었을 경우 또는 ..
2019.12.05
[CUDA] Cudnn Error in nvinfer1::rt::CommonContext::configure: 7 (CUDNN_STATUS_MAPPING_ERROR)
Cudnn Error in nvinfer1::rt::CommonContext::configure: 7 (CUDNN_STATUS_MAPPING_ERROR) Cudnn Error in nvinfer1::rt::CommonContext::configure: 7 (CUDNN_STATUS_MAPPING_ERROR) Cudnn Error in nvinfer1::rt::CommonContext::configure: 7 (CUDNN_STATUS_MAPPING_ERROR) Cudnn Error in nvinfer1::rt::CommonContext::configure: 7 (CUDNN_STATUS_MAPPING_ERROR) Cudnn Error in nvinfer1::rt::CommonContext::configure:..
2019.12.05