TensorRT PoolingLayer
TensorRT PoolingLayer
IPoolingLayer在通道中實現池。支持的池類型有maximum、average和maximum average混合。
Layer Description: 2D pooling層描述:二維池
用2D濾波器計算a維張量a上的池,生成B維的張量B。B的維數取決于a的維數、窗口大小r、對稱填充p和步長s,因此:
PoolingType::kMAX
Maximum over elements in window.
PoolingType::kAVERAGE
Average over elements in the window.
PoolingType::kMAX_AVERAGE_BLEND
Hybrid of maximum and average pooling. The
results of the maximum pooling and the average pooling are combined with the blending factor as (1-blendFactor)*maximumPoolingResult
- blendFactor*averagePoolingResult to yield the result. The blendFactor
can be set to a value between 0 and 1.
默認情況下,平均池是在池窗口和填充的輸入之間的重疊處執行的。如果exclusive參數設置為true,則在池窗口和未添加的輸入之間的重疊區域執行平均池。
Layer Description: 3D pooling圖層說明:三維池
使用3D過濾器計算a維度張量a上的池,以生成維度B的張量B。B的維度取決于a的維度、窗口大小r、對稱填充p和跨距s,因此:
Where func is defined by one of the pooling types t:
PoolingType::kMAX
Maximum over elements in window.
PoolingType::kAVERAGE
Average over elements in the window.
PoolingType::kMAX_AVERAGE_BLEND
Hybrid of maximum and average pooling. The results of the maximum pooling and the average pooling are combined with the blending factor as (1-blendFactor)*maximumPoolingResult
- blendFactor*averagePoolingResult to yield the result. The blendFactor can be set to a value between 0 and 1.
默認情況下,平均池是在池窗口和填充的輸入之間的重疊處執行的。如果exclusive參數設置為true,則在池窗口和未添加的輸入之間的重疊區域執行平均池。
條件和限制
2D或3D由輸入核維數的數量決定。對于2D池,輸入和輸出張量應該有3個或更多維。對于3D池,輸入和輸出張量應具有4個或更多維度。
總結
以上是生活随笔為你收集整理的TensorRT PoolingLayer的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: TensorRT IRNNv2Layer
- 下一篇: Python API vs C++ AP