From: 장지섭/On-Device Lab(SR)/Engineer/삼성전자 Date: Thu, 14 Mar 2019 07:48:05 +0000 (+0900) Subject: Introduce ONE_HOT, GREATER_EQUAL and LESS operation into NeuralNetworsEx.h (#4736) X-Git-Tag: submit/tizen/20190325.013700~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4cc373647f3ba2eb53fd55720e9c14870f03a16;p=platform%2Fcore%2Fml%2Fnnfw.git Introduce ONE_HOT, GREATER_EQUAL and LESS operation into NeuralNetworsEx.h (#4736) * Introduce ONE_HOT_EX operation in NeuralNetworksEx.h This commit introduces ONE_HOT_EX operation in NeuralNetworsEx.h. Signed-off-by: jiseob.jang * Introduce GREATER_EQUAL_EX and LESS_EX operations in NeuralNetworksEx.h This commit introduces GREATER_EQUAL_EX and LESS_EX operations in NeuralNetworksEx.h Signed-off-by: jiseob.jang --- diff --git a/include/NeuralNetworksEx.h b/include/NeuralNetworksEx.h index a941a10..79059ec 100644 --- a/include/NeuralNetworksEx.h +++ b/include/NeuralNetworksEx.h @@ -638,6 +638,83 @@ typedef enum { * * 0: A tensor of the same {@link OperandCode} as input0. */ ANEURALNETWORKS_PRELU_EX = 500022, + + /** + * Returns a one-hot tensor. + * + * The locations represented by indices in indices take value on_value, while all other locations + * take value off_value. + * The on_value and off_value must have matching data types. They must be the same data type as + * specified by the data type of output. + * + * If the input indices is rank N, the output will have rank N+1. The new axis is created at + * dimension axis. + * If indices is a scalar the output shape will be a vector of length depth. + * + * Supported tensor {@link OperandCode}: + * * {@link ANEURALNETWORKS_TENSOR_FLOAT32} + * * {@link ANEURALNETWORKS_TENSOR_INT32} + * + * Supported tensor rank: up to 4 + * + * Inputs: + * * 0: An {@link ANEURALNETWORKS_INT32} tensor, specifying the indices. + * * 1: An {@link ANEURALNETWORKS_INT32} scalar, specifying the depth. + * * 2: A scalar, specifying the on_value. + * * 3: A scalar, specifying the off_value. + * * 4: An {@link ANEURALNETWORKS_INT32} scalar, specifying the axis to fill. Optional. + * (default: -1, a new inner-most axis). + * + * Outputs: + * * 0: The one-hot tensor. + */ + ANEURALNETWORKS_ONE_HOT_EX = 50023, + + /** + * For input tensors x and y, computes x >= y elementwise. + * + * Supported tensor {@link OperandCode}: + * * {@link ANEURALNETWORKS_TENSOR_FLOAT32} + * * {@link ANEURALNETWORKS_TENSOR_INT32} + * * {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM} + * + * Supported tensor rank: from 1 + * + * This operation supports broadcasting. + * + * Inputs: + * * 0: A tensor. + * * 1: A tensor of the same {@link OperandCode} and dimensions compatible + * with input0. + * + * Outputs: + * * 0: A boolean tensor of {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM} + * with offset 0 and scale 1.0f. + */ + ANEURALNETWORKS_GREATER_EQUAL_EX = 50024, + + /** + * For input tensors x and y, computes x < y elementwise. + * + * Supported tensor {@link OperandCode}: + * * {@link ANEURALNETWORKS_TENSOR_FLOAT32} + * * {@link ANEURALNETWORKS_TENSOR_INT32} + * * {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM} + * + * Supported tensor rank: from 1 + * + * This operation supports broadcasting. + * + * Inputs: + * * 0: A tensor. + * * 1: A tensor of the same {@link OperandCode} and dimensions compatible + * with input0. + * + * Outputs: + * * 0: A tensor of {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM} + * with offset 0 and scale 1.0f. + */ + ANEURALNETWORKS_LESS_EX = 50025, } OperationCodeEx; // extends OperationCode typedef OperationCodeEx ANeuralNetworksOperationTypeEx;