From 33a3ee5b237cfcfb0a72308c25e2bdb1e766d10c Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Thu, 6 Sep 2018 19:10:37 +0900 Subject: [PATCH] [ann] Introduce ANEURALNETWORKS_PAD (#1386) ANEURALNETWORKS_PAD tag is currently missing in "NeuralNetworks.h". Signed-off-by: Jonghyun Park --- contrib/ann/api/include/NeuralNetworks.h | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/contrib/ann/api/include/NeuralNetworks.h b/contrib/ann/api/include/NeuralNetworks.h index 11afb53..6061569 100644 --- a/contrib/ann/api/include/NeuralNetworks.h +++ b/contrib/ann/api/include/NeuralNetworks.h @@ -1199,6 +1199,40 @@ typedef enum { ANEURALNETWORKS_DIV = 30, /** + * Pads a tensor. + * + * This operation pads a tensor according to the specified paddings. + * + * Supported tensor {@link OperandCode}: + * * {@link ANEURALNETWORKS_TENSOR_FLOAT32} + * * {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM} + * + * Supported tensor rank: up to 4 + * + * Inputs: + * * 0: An n-D tensor, specifying the tensor to be padded. + * * 1: A 2-D Tensor of {@link ANEURALNETWORKS_TENSOR_INT32}, the paddings + * for each spatial dimension of the input tensor. The shape of the + * tensor must be {rank(input0), 2}. + * padding[i, 0] specifies the number of elements to be padded in the + * front of dimension i. + * padding[i, 1] specifies the number of elements to be padded after the + * end of dimension i. + * + * Outputs: + * * 0: A tensor of the same {@link OperandCode} as input0. The + * output tensor has the same rank as input0, and each + * dimension of the output tensor has the same size as the + * corresponding dimension of the input tensor plus the size + * of the padding: + * output0.dimension[i] = + * padding[i, 0] + input0.dimension[i] + padding[i, 1] + * + * Available since API level 28. + */ + ANEURALNETWORKS_PAD = 32, + + /** * Extracts a strided slice of a tensor. * * Roughly speaking, this op extracts a slice of size (end - begin) / stride -- 2.7.4