diff options
author | Prasanna R/SNAP /SRI-Bangalore/Engineer/삼성전자 <prasanna.r@samsung.com> | 2018-12-03 07:39:37 +0530 |
---|---|---|
committer | 이춘석/동작제어Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com> | 2018-12-03 11:09:37 +0900 |
commit | 5548159db70dbc52545d3426af901d2c7ad57fba (patch) | |
tree | 1194daa5a670a01f355f2824c8c8984d228859d3 /include | |
parent | ab46f656f445fbfadb0cb006cf92a7c0c4b68383 (diff) | |
download | nnfw-5548159db70dbc52545d3426af901d2c7ad57fba.tar.gz nnfw-5548159db70dbc52545d3426af901d2c7ad57fba.tar.bz2 nnfw-5548159db70dbc52545d3426af901d2c7ad57fba.zip |
Introduce PRELU_EX in NeuralNetworksEx.h (#3769)
This patch introduces PRELU_EX in NeuralNetworksEx.h
Related issue: #3574 #3459
Signed-off-by: prasannar <prasanna.r@samsung.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/NeuralNetworksEx.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/NeuralNetworksEx.h b/include/NeuralNetworksEx.h index 2c8fd9dc8..49506ce7d 100644 --- a/include/NeuralNetworksEx.h +++ b/include/NeuralNetworksEx.h @@ -510,6 +510,42 @@ typedef enum { * * 0: A tensor of the same {@link OperandCode} as input0. */ ANEURALNETWORKS_REDUCE_MIN_EX = 500021, + + /** + * Parametric Rectified Linear Unit. + * + * It follows: f(x) = alpha * x for x < 0, f(x) = x for x >= 0, where alpha + * is a learned array with the same {@link OperandCode} and compatible + * dimensions as input x. + * + * 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. + * + * Example: + * input.dimension = {4, 1, 2} + * alpha.dimension = {5, 4, 3, 1} + * output.dimension = {5, 4, 3, 2} + * + * Supported tensor {@link OperandCode}: + * * {@link ANEURALNETWORKS_TENSOR_FLOAT32} + * * {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM} + * + * Supported tensor rank: up to 4 + * + * Inputs: + * * 0: A tensor, specifying the input. + * * 1: A tensor of the same {@link OperandCode}, and compatible dimensions + * as input0, specifying the alpha. + * + * Outputs: + * * 0: A tensor of the same {@link OperandCode} as input0. + */ + ANEURALNETWORKS_PRELU_EX = 500022, } OperationCodeEx; // extends OperationCode typedef OperationCodeEx ANeuralNetworksOperationTypeEx; |