aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarat Dukhan <maratek@google.com>2020-06-10 19:42:15 -0700
committerXNNPACK Team <xnnpack-github-robot@google.com>2020-06-10 19:42:52 -0700
commit5bbebac71014c5c2bafb65686f409bcf117baeb3 (patch)
tree4941de5fcc40b4f19497b9b4d3db4dac3bd91892 /include
parent28813333b3fd677354076b97f8e656e217590c97 (diff)
downloadXNNPACK-5bbebac71014c5c2bafb65686f409bcf117baeb3.tar.gz
Leaky ReLU operator in Subgraph API
PiperOrigin-RevId: 315817869
Diffstat (limited to 'include')
-rw-r--r--include/xnnpack.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/xnnpack.h b/include/xnnpack.h
index 96a438622..646bda905 100644
--- a/include/xnnpack.h
+++ b/include/xnnpack.h
@@ -862,6 +862,21 @@ enum xnn_status xnn_define_hardswish(
uint32_t output_id,
uint32_t flags);
+/// Define a Leaky ReLU Node and add it to a Subgraph.
+///
+/// @param subgraph - a Subgraph object that will own the created Node.
+/// @param negative_slope - scale factor for negative input elements.
+/// @param input_id - Value ID for the input tensor. The input tensor must be defined in the @a subgraph.
+/// @param output_id - Value ID for the output tensor. The output tensor must be defined in the @a subgraph, and its
+/// shape must match the shape of the input tensor.
+/// @param flags - binary features of the Leaky ReLU Node. No supported flags are currently defined.
+enum xnn_status xnn_define_leaky_relu(
+ xnn_subgraph_t subgraph,
+ float negative_slope,
+ uint32_t input_id,
+ uint32_t output_id,
+ uint32_t flags);
+
/// Define a Negate Node and add it to a Subgraph.
///
/// @param subgraph - a Subgraph object that will own the created Node.