From 2de864eb61004628ca7592578206ba04348260b9 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 23 Jan 2019 23:32:36 +0100 Subject: [PATCH] [ai] add some documentation to activation.h --- src/ai/activation.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/ai/activation.h b/src/ai/activation.h index 378c5f89..0a65354d 100644 --- a/src/ai/activation.h +++ b/src/ai/activation.h @@ -22,11 +22,34 @@ #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 -- 2.11.0