aboutsummaryrefslogtreecommitdiff
path: root/chapters/activation_funcs.adoc
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2022-08-05 15:40:12 -0700
committerEric Kunze <eric.kunze@arm.com>2022-08-19 14:19:28 -0700
commit58098a7b1ffcf41da759f862deb753c82fe5b4b0 (patch)
tree75b61a482e23293b8af85adf6210f2d3e4e5695d /chapters/activation_funcs.adoc
parent6361d1664c7b82ecc3afdd0eb87e96afea430f89 (diff)
downloadspecification-58098a7b1ffcf41da759f862deb753c82fe5b4b0.tar.gz
Machine parsable specification
This converts portions of the asciidoc specification into an xml document and schema. For the html and pdf outputs, the xml is converted to asciidoc files that are included into the existing specification. The xml allows future automated uses of the tosa specification while maintaining rough compatibility with the existing document. No significant functional changes are included in this change. Change-Id: I7f1f95c527638e270c157d58fcdec6a3510daea5 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Diffstat (limited to 'chapters/activation_funcs.adoc')
-rw-r--r--chapters/activation_funcs.adoc62
1 files changed, 4 insertions, 58 deletions
diff --git a/chapters/activation_funcs.adoc b/chapters/activation_funcs.adoc
index 27ba596..54697d2 100644
--- a/chapters/activation_funcs.adoc
+++ b/chapters/activation_funcs.adoc
@@ -11,20 +11,12 @@
=== Activation Functions
==== CLAMP
+
Clamp to an arbitrary minimum and maximum value.
Maximum and minimum values are specified as values in the range of the input type.
No zero point subtraction is done to the values, thus to clamp to the zero point value, the zero point itself should be supplied as the minimum value.
-*Arguments:*
-
-|===
-|Argument|Type|Name|Shape|Description
-
-|Input|in_out_t*|Input|shape|Input tensor
-|Attribute|in_out_t|min_val|-|minimum clip value
-|Attribute|in_out_t|max_val|-|maximum clip value
-|Output|in_out_t*|Output|shape|Output tensor of same type and shape as input
-|===
+include::{generated}/operators/CLAMP.adoc[]
*Operation Function:*
[source,c++]
@@ -37,18 +29,6 @@ for_each(index in shape) {
}
----
-*Supported Data Types:*
-
-|===
-|Profile|Mode|in_out_t
-
-|Any|signed 8|int8_t
-|Any|signed 16|int16_t
-|MI, MT|fp16|fp16_t
-|MI, MT|bf16|bf16_t
-|MI, MT|fp32|fp32_t
-|===
-
==== SIGMOID
Sigmoid function: output = 1 / (1 + exp(-input))
@@ -69,24 +49,7 @@ int16_t sigmoid_reference(int16_t x) { // input x range is -256 to + 256 inclusi
generate_lookup_table(&sigmoid_table, &sigmoid_reference);
----
-*Arguments:*
-
-|===
-|Argument|Type|Name|Shape|Description
-
-|Input|in_out_t*|Input|shape|Input tensor
-|Output|in_out_t*|Output|shape|Output tensor of same type and shape as input
-|===
-
-*Supported Data Types:*
-
-|===
-|Profile|Mode|in_out_t
-
-|MI, MT|fp16|fp16_t
-|MI, MT|bf16|bf16_t
-|MI, MT|fp32|fp32_t
-|===
+include::{generated}/operators/SIGMOID.adoc[]
==== TANH
@@ -109,21 +72,4 @@ int16_t tanh_reference(int16_t x) { // input x range is -256 to +256 inclusive
generate_lookup_table(&tanh_table, &tanh_reference);
----
-*Arguments:*
-
-|===
-|Argument|Type|Name|Shape|Description
-
-|Input|in_out_t*|Input|shape|Input tensor
-|Output|in_out_t*|Output|shape|Output tensor of same type and shape as input
-|===
-
-*Supported Data Types:*
-
-|===
-|Profile|Mode|in_out_t
-
-|MI, MT|fp16|fp16_t
-|MI, MT|bf16|bf16_t
-|MI, MT|fp32|fp32_t
-|===
+include::{generated}/operators/TANH.adoc[]