From: Prasanna R/System SW /SRI-Bangalore/Engineer/삼성전자 Date: Wed, 31 Oct 2018 09:55:07 +0000 (+0530) Subject: Defining SQUARED_DIFFERENCE_EX in NeuralNetworksEx.h (#3413) X-Git-Tag: 0.3~491 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f4035a049fb76c1466e5d3978a461012e0790df;p=platform%2Fcore%2Fml%2Fnnfw.git Defining SQUARED_DIFFERENCE_EX in NeuralNetworksEx.h (#3413) This patch defines SQUARED_DIFFERENCE_EX in NeuralNetworksEx.h Related issue: #3347 Signed-off-by: prasannar --- diff --git a/include/NeuralNetworksEx.h b/include/NeuralNetworksEx.h index 7213198..f6b1b8a 100644 --- a/include/NeuralNetworksEx.h +++ b/include/NeuralNetworksEx.h @@ -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,