source: src/ai/activation.h @ be3164d

feature/crepe
Last change on this file since be3164d was 2de864e, checked in by Paul Brossier <piem@piem.org>, 3 years ago

[ai] add some documentation to activation.h

  • Property mode set to 100644
File size: 1.3 KB
Line 
1
2/*
3  Copyright (C) 2018 Paul Brossier <piem@aubio.org>
4
5  This file is part of aubio.
6
7  aubio is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11
12  aubio is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  GNU General Public License for more details.
16
17  You should have received a copy of the GNU General Public License
18  along with aubio.  If not, see <http://www.gnu.org/licenses/>.
19
20*/
21
22#ifndef AUBIO_ACTIVATION_H
23#define AUBIO_ACTIVATION_H
24
25/** \file
26
27  Activation functions.
28
29*/
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35/** Rectifier linear unit (ReLU)
36
37  \param t input tensor on which to compute the activation function (in-place)
38
39  Upon return, each value \f$x\f$ of the tensor \f$t\f$ will be set to
40  \f$max(0, x)\f$.
41
42*/
43void aubio_activation_relu(aubio_tensor_t *t);
44
45/** compute sigmoid activation
46
47  \param t input tensor on which to compute the activation function (in-place)
48
49  Upon return, each value \f$x\f$ of the tensor \f$t\f$ will be set to
50  \f$\frac{1}{1 + e^{-x}}\f$.
51
52*/
53void aubio_activation_sigmoid(aubio_tensor_t *t);
54
55#endif
Note: See TracBrowser for help on using the repository browser.