From: Paul Brossier Date: Tue, 29 Jan 2019 01:59:06 +0000 (+0100) Subject: [maxpool2d] add basic documentation X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=84295153cd12fed020a95512d499ac57904826e2;p=aubio.git [maxpool2d] add basic documentation --- diff --git a/src/ai/maxpool2d.h b/src/ai/maxpool2d.h index 5786bd0e..39c7ff4e 100644 --- a/src/ai/maxpool2d.h +++ b/src/ai/maxpool2d.h @@ -21,26 +21,56 @@ #ifndef AUBIO_MAXPOOL2D_H #define AUBIO_MAXPOOL2D_H +/** \file + + Max pooling layer (2D) + +*/ + #ifdef __cplusplus extern "C" { #endif +/** maxpool2d layer */ typedef struct _aubio_maxpool2d_t aubio_maxpool2d_t; +/** create a new maxpool2d layer + + \param pool_size size of the pooling windows + + \return new ::aubio_maxpool2d_t layer + +*/ aubio_maxpool2d_t *new_aubio_maxpool2d(uint_t pool_size[2]); -void aubio_maxpool2d_do(aubio_maxpool2d_t *t, - aubio_tensor_t *input_tensor, - aubio_tensor_t *activations); +/** get output shape -uint_t aubio_maxpool2d_set_weights(aubio_maxpool2d_t *t, - aubio_tensor_t *kernels); + \param t layer + \param input input tensor + \param shape output shape -aubio_tensor_t *aubio_maxpool2d_get_weigths(aubio_maxpool2d_t *t); + \return 0 on success, non-zero otherwise +*/ uint_t aubio_maxpool2d_get_output_shape(aubio_maxpool2d_t *t, aubio_tensor_t *input, uint_t *shape); +/** compute layer output + + \param t layer + \param input_tensor input tensor + \param output_tensor output tensor + +*/ +void aubio_maxpool2d_do(aubio_maxpool2d_t *t, + aubio_tensor_t *input_tensor, + aubio_tensor_t *output_tensor); + +/** destroy layer + + \param t layer to destroy + +*/ void del_aubio_maxpool2d(aubio_maxpool2d_t *t); #ifdef __cplusplus