Changeset 53849b0 for src


Ignore:
Timestamp:
Dec 29, 2021, 5:52:01 PM (2 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/crepe
Children:
514a87c
Parents:
ada7989
git-author:
Paul Brossier <piem@piem.org> (01/29/19 02:55:31)
git-committer:
Paul Brossier <piem@piem.org> (12/29/21 17:52:01)
Message:

[dense] improve documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ai/dense.h

    rada7989 r53849b0  
    2424/** \file
    2525
    26  Fully connected dense layer.
     26 Fully connected layer
    2727
    2828*/
     
    3232#endif
    3333
     34/** dense layer */
    3435typedef struct _aubio_dense_t aubio_dense_t;
    3536
     37/** create a new dense layer
     38
     39  \param n_units    number of units
     40
     41  \return new dense layer
     42
     43*/
    3644aubio_dense_t *new_aubio_dense(uint_t n_units);
    3745
    38 void del_aubio_dense(aubio_dense_t *c);
     46/** get output shape
    3947
     48  \param c      ::aubio_dense_t layer
     49  \param input  input tensor
     50  \param shape  output shape
     51
     52  \return 0 on success, non-zero otherwise
     53
     54*/
    4055uint_t aubio_dense_get_output_shape(aubio_dense_t *c,
    4156    aubio_tensor_t *input, uint_t *shape);
    4257
     58/** get internal weights
     59
     60   \param c     dense layer
     61
     62   \return matrix of weights
     63
     64   This function should be called after ::aubio_dense_get_output_shape
     65   to get a pointer to the internal weight matrix.
     66
     67*/
    4368fmat_t *aubio_dense_get_weights(aubio_dense_t *c);
    4469
     70/** get internal biases
     71
     72   \param c     dense layer
     73
     74   \return vector of biases
     75
     76   This function should be called after ::aubio_dense_get_output_shape
     77   to get a pointer to the internal biases.
     78
     79*/
    4580fvec_t *aubio_dense_get_bias(aubio_dense_t *c);
    4681
     82/** compute forward pass
     83
     84  \param c          ::aubio_dense_t layer
     85  \param input      input tensor
     86  \param output     output tensor
     87
     88  This function computes the output of the dense layer given an input tensor.
     89
     90*/
    4791void aubio_dense_do(aubio_dense_t *c, aubio_tensor_t *input,
    4892    aubio_tensor_t *output);
     93
     94/** destroy layer
     95
     96  \param c  layer to destroy
     97
     98*/
     99void del_aubio_dense(aubio_dense_t *c);
    49100
    50101#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.