source: src/ai/maxpool2d.h @ 36ab428

feature/crepe_org
Last change on this file since 36ab428 was 217ca89, checked in by Paul Brossier <piem@piem.org>, 6 years ago

[maxpool2d] add basic documentation

  • Property mode set to 100644
File size: 1.8 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_MAXPOOL2D_H
22#define AUBIO_MAXPOOL2D_H
23
24/** \file
25
26  Max pooling layer (2D)
27
28*/
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34/** maxpool2d layer */
35typedef struct _aubio_maxpool2d_t aubio_maxpool2d_t;
36
37/** create a new maxpool2d layer
38
39  \param pool_size  size of the pooling windows
40
41  \return new ::aubio_maxpool2d_t layer
42
43*/
44aubio_maxpool2d_t *new_aubio_maxpool2d(uint_t pool_size[2]);
45
46/** get output shape
47
48  \param t      layer
49  \param input  input tensor
50  \param shape  output shape
51
52  \return 0 on success, non-zero otherwise
53
54*/
55uint_t aubio_maxpool2d_get_output_shape(aubio_maxpool2d_t *t,
56        aubio_tensor_t *input, uint_t *shape);
57
58/** compute layer output
59
60  \param    t               layer
61  \param    input_tensor    input tensor
62  \param    output_tensor   output tensor
63
64*/
65void aubio_maxpool2d_do(aubio_maxpool2d_t *t,
66        aubio_tensor_t *input_tensor,
67        aubio_tensor_t *output_tensor);
68
69/** destroy layer
70
71  \param t      layer to destroy
72
73*/
74void del_aubio_maxpool2d(aubio_maxpool2d_t *t);
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif /* AUBIO_MAXPOOL2D_H */
Note: See TracBrowser for help on using the repository browser.