예를 들어, "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 of convolutional neural networks. DLA supports various layers such as convolution, deconvo
docs.nvidia.com
TensorRT 는 두가지로 나뉜다.
- TensorFlow 내에 위치한 TensorRT
- Python 내에 위치한 TensorRT
TensorFlow 내에 위치한 TensorRT는 지원하지 않는 레이어가 있을 때 TF-TRT 를 이용하여
지원하지 않는 부분을 제외하고 최적화를 시키는 방식을 사용한다. 즉, tf-trt 모델로 만들어서 사용할 수 있다.
The integration applies optimizations to the supported graphs, leaving unsupported operations untouched to be natively executed in TensorFlow.
Python 내에 위치한 TensorRT 에서는 지원하지 않는 레이어가 있을 때 custom layer 를 만드는 것이다.
예를 들어, ResizeBilinear 의 CUDA 구현을 찾아서 사용자 정의 레이어를 구현하여 TensorRT 기능을 확장 시킬 수 있다.
C++ 과 Python API 를 위한 IPluginV2 클래스, 플러그인을 사용하여 사용자 정의 레이어 (Custom Layer)를 구현 할 수 있다.
이는 사용자 정의 레이어를 구현하므로써 TensorRT에 인스턴스화 해서 TensorRT 엔진 내에서 사용할 수 있다.
참고자료 :
https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#extending
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 of convolutional neural networks. DLA supports various layers such as convolution, deconvo
docs.nvidia.com
https://devtalk.nvidia.com/default/topic/1047578/jetson-agx-xavier/resizebilinear-op-not-fallback-to-gpu/
devtalk.nvidia.com
Custom Layer 참고자료
https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#python_topics
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 of convolutional neural networks. DLA supports various layers such as convolution, deconvo
docs.nvidia.com
TensorRT Samples Support Guide :: Deep Learning SDK Documentation
What Does This Sample Do? This sample, sampleFasterRCNN, uses TensorRT plugins, performs inference, and implements a fused custom layer for end-to-end inferencing of a Faster R-CNN model. Specifically, this sample demonstrates the implementation of a Faste
docs.nvidia.com
https://github.com/xiang-zhe/common/blob/966db2fc99af0f8fd048eecc4feca477e27afe38/TOOLS/TRT/TRT5.py
xiang-zhe/common
Contribute to xiang-zhe/common development by creating an account on GitHub.
github.com
'AI Development > TensorRT' 카테고리의 다른 글
[TensorRT] 마지막 노드 찾기 (0) | 2019.08.03 |
---|---|
[TensorRT] TF-TRT vs TRT (0) | 2019.08.03 |
[TensorRT] ImportError: No module named 'tensorrt.parsers'; 'tensorrt' is not a package (0) | 2019.06.10 |
[TensorRT] TensorRT를 이용한 ResNet 예제 (0) | 2019.04.12 |
[TensorRT] TensorRT support Python2.7, 3.5 (0) | 2019.04.12 |