Description
in (Developer Guide :: NVIDIA Deep Learning TensorRT Documentation), there are two conception really confuse me, they are “implicity data-dependent shape” and “explicitly data-dependent shape”, I cannot understand them purely from the describtion. Can anybody explain me about them by example of code? Thank you very much~
Explicitly Data-Dependent Shape (INonZeroLayer or INMSLayer):
- This type of dynamic shape arises from specific layers in the network:
- INonZeroLayer: This layer removes elements from a tensor based on a threshold. The resulting tensor’s size depends on how many elements meet the threshold, making it data-dependent.
- INMSLayer (Non-Maximum Suppression): This layer removes redundant bounding boxes in object detection tasks. The number of remaining boxes depends on the input data, leading to a dynamic output shape.
Implicitly Data-Dependent Shape:
- This dynamic shape arises from operations in the network where the output size depends on intermediate calculations, not specific layers, also based on input shape tensors and INonZero or INMS. Common examples include Convolutions, Pooling Layers, etc.