[ba0c332] | 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_MAXPOOL1D_H |
---|
| 22 | #define AUBIO_MAXPOOL1D_H |
---|
| 23 | |
---|
[382375d] | 24 | /** \file |
---|
| 25 | |
---|
| 26 | Max pooling layer (1D) |
---|
| 27 | |
---|
| 28 | */ |
---|
| 29 | |
---|
[ba0c332] | 30 | #ifdef __cplusplus |
---|
| 31 | extern "C" { |
---|
| 32 | #endif |
---|
| 33 | |
---|
[382375d] | 34 | /** maxpool1d layer */ |
---|
[ba0c332] | 35 | typedef struct _aubio_maxpool1d_t aubio_maxpool1d_t; |
---|
| 36 | |
---|
[382375d] | 37 | /** create a new maxpool1d layer |
---|
| 38 | |
---|
| 39 | \param pool_size size of the pooling windows |
---|
| 40 | |
---|
| 41 | \return new ::aubio_maxpool2d_t layer |
---|
| 42 | |
---|
| 43 | */ |
---|
[ba0c332] | 44 | aubio_maxpool1d_t *new_aubio_maxpool1d(uint_t pool_size[1]); |
---|
| 45 | |
---|
[382375d] | 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 | */ |
---|
[ba0c332] | 55 | uint_t aubio_maxpool1d_get_output_shape(aubio_maxpool1d_t *t, |
---|
| 56 | aubio_tensor_t *input, uint_t *shape); |
---|
| 57 | |
---|
[382375d] | 58 | /** compute layer output |
---|
| 59 | |
---|
| 60 | \param t layer |
---|
| 61 | \param input_tensor input tensor |
---|
| 62 | \param output_tensor output tensor |
---|
| 63 | |
---|
| 64 | */ |
---|
[ba0c332] | 65 | void aubio_maxpool1d_do(aubio_maxpool1d_t *t, |
---|
| 66 | aubio_tensor_t *input_tensor, |
---|
[382375d] | 67 | aubio_tensor_t *output_tensor); |
---|
| 68 | |
---|
| 69 | /** destroy layer |
---|
[ba0c332] | 70 | |
---|
[382375d] | 71 | \param t layer to destroy |
---|
| 72 | |
---|
| 73 | */ |
---|
[ba0c332] | 74 | void del_aubio_maxpool1d(aubio_maxpool1d_t *t); |
---|
| 75 | |
---|
| 76 | #ifdef __cplusplus |
---|
| 77 | } |
---|
| 78 | #endif |
---|
| 79 | |
---|
| 80 | #endif /* AUBIO_MAXPOOL1D_H */ |
---|