1 | /* |
---|
2 | Copyright (C) 2018 Paul Brossier <piem@aubio.org> |
---|
3 | |
---|
4 | This file is part of aubio. |
---|
5 | |
---|
6 | aubio is free software: you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation, either version 3 of the License, or |
---|
9 | (at your option) any later version. |
---|
10 | |
---|
11 | aubio is distributed in the hope that it will be useful, |
---|
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | GNU General Public License for more details. |
---|
15 | |
---|
16 | You should have received a copy of the GNU General Public License |
---|
17 | along with aubio. If not, see <http://www.gnu.org/licenses/>. |
---|
18 | |
---|
19 | */ |
---|
20 | |
---|
21 | #ifndef AUBIO_DENSE_H |
---|
22 | #define AUBIO_DENSE_H |
---|
23 | |
---|
24 | /** \file |
---|
25 | |
---|
26 | Fully connected dense layer. |
---|
27 | |
---|
28 | */ |
---|
29 | |
---|
30 | #ifdef __cplusplus |
---|
31 | extern "C" { |
---|
32 | #endif |
---|
33 | |
---|
34 | typedef struct _aubio_dense_t aubio_dense_t; |
---|
35 | |
---|
36 | aubio_dense_t *new_aubio_dense(uint_t n_units); |
---|
37 | |
---|
38 | void del_aubio_dense(aubio_dense_t *c); |
---|
39 | |
---|
40 | uint_t aubio_dense_get_output_shape(aubio_dense_t *c, |
---|
41 | aubio_tensor_t *input, uint_t *shape); |
---|
42 | |
---|
43 | fmat_t *aubio_dense_get_weights(aubio_dense_t *c); |
---|
44 | |
---|
45 | fvec_t *aubio_dense_get_bias(aubio_dense_t *c); |
---|
46 | |
---|
47 | void aubio_dense_do(aubio_dense_t *c, aubio_tensor_t *input, |
---|
48 | aubio_tensor_t *output); |
---|
49 | |
---|
50 | #ifdef __cplusplus |
---|
51 | } |
---|
52 | #endif |
---|
53 | |
---|
54 | #endif /* AUBIO_DENSE_H */ |
---|