aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Types.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-10-30 15:56:32 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitadaae7e453cc4cc07905daca68fa7b938555d581 (patch)
tree712003aa080cf577b2b2af318f219367897dc0e4 /arm_compute/core/Types.h
parentcf3935ffd4c67d9396c2435a3a28d3a159753105 (diff)
downloadComputeLibrary-adaae7e453cc4cc07905daca68fa7b938555d581.tar.gz
COMPMID-647: Exclude padding pixels from averaging factor.
Adds support for excluding the padding pixels from the average scaling factor calculation. Change-Id: Ia13fbfeae235aff564db74191613921848231a01 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/93715 Reviewed-by: Robert Hughes <robert.hughes@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'arm_compute/core/Types.h')
-rw-r--r--arm_compute/core/Types.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index e567bac860..e8be6127a8 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -545,9 +545,15 @@ public:
* @param[in] pool_type Pooling type @ref PoolingType. Defaults to @ref PoolingType::MAX
* @param[in] pool_size (Optional) Pooling size, in elements, across x and y. Defaults to 2.
* @param[in] pad_stride_info (Optional) Padding and stride information @ref PadStrideInfo
+ * @param[in] exclude_padding (Optional) Strategy when accounting padding in calculations.
+ * True will exclude padding while false will not (Used in AVG/L2 pooling to determine the pooling area).
+ * Defaults to false;
*/
- PoolingLayerInfo(PoolingType pool_type = PoolingType::MAX, unsigned int pool_size = 2, PadStrideInfo pad_stride_info = PadStrideInfo())
- : _pool_type(pool_type), _pool_size(pool_size), _pad_stride_info(pad_stride_info)
+ PoolingLayerInfo(PoolingType pool_type = PoolingType::MAX,
+ unsigned int pool_size = 2,
+ PadStrideInfo pad_stride_info = PadStrideInfo(),
+ bool exclude_padding = false)
+ : _pool_type(pool_type), _pool_size(pool_size), _pad_stride_info(pad_stride_info), _exclude_padding(exclude_padding)
{
}
PoolingType pool_type() const
@@ -562,11 +568,16 @@ public:
{
return _pad_stride_info;
}
+ bool exclude_padding() const
+ {
+ return _exclude_padding;
+ }
private:
PoolingType _pool_type;
unsigned int _pool_size;
PadStrideInfo _pad_stride_info;
+ bool _exclude_padding;
};
/** ROI Pooling Layer Information class */