Introducing NotEqual op in NeuralNetworksEx (#3473)
authorSiva Sai Vaddipati/System SW /SRI-Bangalore/Engineer/삼성전자 <siva.sai@samsung.com>
Tue, 6 Nov 2018 02:30:37 +0000 (08:00 +0530)
committer이춘석/동작제어Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Tue, 6 Nov 2018 02:30:37 +0000 (11:30 +0900)
This commit introduces NotEqual op in NeuralNetworksEx.h
Related issues: #3335, #3337

Signed-off-by: Siva Sai <siva.sai@samsung.com>
include/NeuralNetworksEx.h

index 60cec26..ee76d7b 100644 (file)
@@ -212,6 +212,40 @@ typedef enum {
      * * 0: The output tensor, of the same {@link OperandCode} and shape as input0.
      */
     ANEURALNETWORKS_SQRT_EX = 50016,
+
+     /**
+     * Computes element-wise truth value by comparing the input tensors for non-equality.
+     *
+     * Takes two input tensors of identical {@link OperandCode} and compatible dimensions.
+     * The output is the result of comparison of two input tensors.
+     *
+     * 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}
+     * * {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM}
+     *
+     * 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: A boolean tensor indicating the truth value of non-equality of input tensors
+     *      Stored as {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM} with offset 0
+     *      and scale 1.0f.
+     *      A non-zero byte represents True, a hit. A zero indicates otherwise.
+     */
+    ANEURALNETWORKS_NOT_EQUAL_EX = 50017,
 } OperationCodeEx;  // extends OperationCode
 
 typedef OperationCodeEx ANeuralNetworksOperationTypeEx;