source: src/ai/dense.h @ aa5cc08

feature/cnn_orgfeature/crepe_org
Last change on this file since aa5cc08 was fb3a9f5, checked in by Paul Brossier <piem@piem.org>, 6 years ago

[dense] add first plain version

  • Property mode set to 100644
File size: 1.3 KB
Line 
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
31extern "C" {
32#endif
33
34typedef struct _aubio_dense_t aubio_dense_t;
35
36aubio_dense_t *new_aubio_dense(uint_t n_units);
37
38void del_aubio_dense(aubio_dense_t *c);
39
40uint_t aubio_dense_get_output_shape(aubio_dense_t *c,
41    aubio_tensor_t *input, uint_t *shape);
42
43fmat_t *aubio_dense_get_weights(aubio_dense_t *c);
44
45fvec_t *aubio_dense_get_bias(aubio_dense_t *c);
46
47void 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 */
Note: See TracBrowser for help on using the repository browser.