aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph/frontend/Layers.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2020-02-13 17:59:09 +0000
committerMichele Di Giorgio <michele.digiorgio@arm.com>2020-02-19 21:01:13 +0000
commit102b0ce919bf5415993cdd6b0e4385b35734d38d (patch)
treef711c876711e178a04c3684bb15e202ebf4d14ac /arm_compute/graph/frontend/Layers.h
parent51545e4acbb6a613da5ee19110ca8c8d7fd39776 (diff)
downloadComputeLibrary-102b0ce919bf5415993cdd6b0e4385b35734d38d.tar.gz
COMPMID-3105: Update pad layer to PadV2
Adds the ability to set the padding value in the pad layer node. Change-Id: I2f323146cbdfdfd6cfd617ee4bcafb5ffafedbbb Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2727 Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/graph/frontend/Layers.h')
-rw-r--r--arm_compute/graph/frontend/Layers.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/arm_compute/graph/frontend/Layers.h b/arm_compute/graph/frontend/Layers.h
index 420f715674..61a6fd47ee 100644
--- a/arm_compute/graph/frontend/Layers.h
+++ b/arm_compute/graph/frontend/Layers.h
@@ -832,11 +832,12 @@ class PadLayer final : public ILayer
public:
/** Construct a pad layer.
*
- * @param[in] padding The padding for each spatial dimension of the input tensor. The pair padding[i]
- * specifies the front and the end padding in the i-th dimension.
+ * @param[in] padding The padding for each spatial dimension of the input tensor. The pair padding[i]
+ * specifies the front and the end padding in the i-th dimension.
+ * @param[in] pad_value Padding value to use. Defaults to 0.
*/
- PadLayer(PaddingList padding)
- : _padding(padding)
+ PadLayer(PaddingList padding, PixelValue pad_value = PixelValue())
+ : _padding(padding), _pad_value(pad_value)
{
}
@@ -844,11 +845,12 @@ public:
{
NodeParams common_params = { name(), s.hints().target_hint };
NodeIdxPair input = { s.tail_node(), 0 };
- return GraphBuilder::add_pad_node(s.graph(), common_params, input, _padding);
+ return GraphBuilder::add_pad_node(s.graph(), common_params, input, _padding, _pad_value);
}
private:
PaddingList _padding;
+ PixelValue _pad_value;
};
/** Permute Layer */