[ann] Introduce ANEURALNETWORKS_PAD (#1386)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 6 Sep 2018 10:10:37 +0000 (19:10 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 6 Sep 2018 10:10:37 +0000 (19:10 +0900)
ANEURALNETWORKS_PAD tag is currently missing in "NeuralNetworks.h".

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/ann/api/include/NeuralNetworks.h

index 11afb53..6061569 100644 (file)
@@ -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