Defining SQUARED_DIFFERENCE_EX in NeuralNetworksEx.h (#3413)
authorPrasanna R/System SW /SRI-Bangalore/Engineer/삼성전자 <prasanna.r@samsung.com>
Wed, 31 Oct 2018 09:55:07 +0000 (15:25 +0530)
committer박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Wed, 31 Oct 2018 09:55:07 +0000 (18:55 +0900)
This patch defines SQUARED_DIFFERENCE_EX in NeuralNetworksEx.h
Related issue: #3347

Signed-off-by: prasannar <prasanna.r@samsung.com>
include/NeuralNetworksEx.h

index 7213198..f6b1b8a 100644 (file)
@@ -38,7 +38,36 @@ typedef enum {
     ANEURALNETWORKS_TENSORFLOW_MAX_EX = 50003,  /**< Computes the maximum of elements across dimensions of a tensor */
     ANEURALNETWORKS_SPLIT_EX = 50004, /**< Splits a tensor into sub tensors */
     ANEURALNETWORKS_RSQRT_EX = 50005, /**< Computes reciprocal of square root of x element-wise */
-    ANEURALNETWORKS_SQUARED_DIFFERENCE_EX = 50006, /**< Returns (x-y)(x-y) element-wise */
+
+    /**
+     * Computes element-wise squared difference on the input tensors.
+     *
+     * Takes two input tensors of identical {@link OperandCode} and compatible dimensions.
+     * The output is the result of squaring of difference given by subtracting the second input tensor from the first one.
+     *
+     * Two dimensions are compatible when:
+     *     1. they are equal, or
+     *     2. one of them is 1
+     *
+     * The size of the output is the maximum size along each dimension of the
+     * input operands. It starts with the trailing dimensions, and works its way
+     * forward.
+     *
+     * Supported tensor {@link OperandCode}:
+     * * {@link ANEURALNETWORKS_TENSOR_FLOAT32}
+     * * {@link ANEURALNETWORKS_TENSOR_INT32}
+     *
+     * Supported tensor rank: up to 4
+     *
+     * Inputs:
+     * * 0: An n-D tensor, specifying the first input.
+     * * 1: A tensor of the same {@link OperandCode}, and compatible dimensions
+     *      as input0.
+     *
+     * Outputs:
+     * * 0: The output tensor, of the same {@link OperandCode}
+     */
+    ANEURALNETWORKS_SQUARED_DIFFERENCE_EX = 50006,
     ANEURALNETWORKS_NEG_EX = 50007,
     ANEURALNETWORKS_EXP_EX = 50008,
     ANEURALNETWORKS_TENSORFLOW_SUM_EX = 50009,