[ai] add some documentation to activation.h
authorPaul Brossier <piem@piem.org>
Wed, 23 Jan 2019 22:32:36 +0000 (23:32 +0100)
committerPaul Brossier <piem@piem.org>
Wed, 29 Dec 2021 16:52:00 +0000 (11:52 -0500)
src/ai/activation.h

index 378c5f8..0a65354 100644 (file)
 #ifndef AUBIO_ACTIVATION_H
 #define AUBIO_ACTIVATION_H
 
+/** \file
+
+  Activation functions.
+
+*/
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+/** Rectifier linear unit (ReLU)
+
+  \param t input tensor on which to compute the activation function (in-place)
+
+  Upon return, each value \f$x\f$ of the tensor \f$t\f$ will be set to
+  \f$max(0, x)\f$.
+
+*/
 void aubio_activation_relu(aubio_tensor_t *t);
+
+/** compute sigmoid activation
+
+  \param t input tensor on which to compute the activation function (in-place)
+
+  Upon return, each value \f$x\f$ of the tensor \f$t\f$ will be set to
+  \f$\frac{1}{1 + e^{-x}}\f$.
+
+*/
 void aubio_activation_sigmoid(aubio_tensor_t *t);
 
 #endif