summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/NeuralNetworksEx.h36
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;