Changeset be3164d for src


Ignore:
Timestamp:
Dec 29, 2021, 5:52:03 PM (2 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/crepe
Children:
07c70b4b
Parents:
cba2b12
git-author:
Paul Brossier <piem@piem.org> (12/27/21 01:38:56)
git-committer:
Paul Brossier <piem@piem.org> (12/29/21 17:52:03)
Message:

[ai] only compile _debug function in debug mode

Location:
src/ai
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/ai/batchnorm.c

    rcba2b12 rbe3164d  
    3232};
    3333
     34#if defined(DEBUG)
    3435static void aubio_batchnorm_debug(aubio_batchnorm_t *c,
    3536    aubio_tensor_t *input_tensor);
     37#endif
    3638
    3739aubio_batchnorm_t *new_aubio_batchnorm(void)
     
    5961}
    6062
     63#if defined(DEBUG)
    6164void aubio_batchnorm_debug(aubio_batchnorm_t *c, aubio_tensor_t *input_tensor)
    6265{
     
    6669      c->n_outputs, 4 * c->n_outputs);
    6770}
     71#endif
    6872
    6973uint_t aubio_batchnorm_get_output_shape(aubio_batchnorm_t *c,
     
    9397  }
    9498
     99#if defined(DEBUG)
    95100  aubio_batchnorm_debug(c, input);
     101#endif
    96102
    97103  return AUBIO_OK;
  • src/ai/conv1d.c

    rcba2b12 rbe3164d  
    5151};
    5252
     53#if defined(DEBUG)
    5354static
    5455void aubio_conv1d_debug(aubio_conv1d_t *c, aubio_tensor_t *input_tensor);
     56#endif
    5557
    5658aubio_conv1d_t *new_aubio_conv1d(uint_t n_filters, uint_t kernel_shape[1])
     
    176178  shape[1] = output_shape[1];
    177179
     180#if defined(DEBUG)
    178181  aubio_conv1d_debug(c, input_tensor);
     182#endif
    179183
    180184  return AUBIO_OK;
    181185}
    182186
     187#if defined(DEBUG)
    183188void aubio_conv1d_debug(aubio_conv1d_t *c, aubio_tensor_t *input_tensor)
    184189{
     
    196201    -c->padding_start);
    197202}
     203#endif
    198204
    199205uint_t aubio_conv1d_check_output_shape(aubio_conv1d_t *c,
  • src/ai/conv2d.c

    rcba2b12 rbe3164d  
    5050};
    5151
     52#if defined(DEBUG)
    5253static void aubio_conv2d_debug(aubio_conv2d_t *c, aubio_tensor_t *input_tensor);
     54#endif
    5355
    5456aubio_conv2d_t *new_aubio_conv2d(uint_t n_filters, uint_t kernel_shape[2])
     
    203205#endif
    204206
     207#if defined(DEBUG)
    205208  aubio_conv2d_debug(c, input_tensor);
     209#endif
    206210
    207211  return AUBIO_OK;
    208212}
    209213
     214#if defined(DEBUG)
    210215void aubio_conv2d_debug(aubio_conv2d_t *c, aubio_tensor_t *input_tensor)
    211216{
     
    228233    -c->padding_start[0], -c->padding_start[1]);
    229234}
     235#endif
    230236
    231237uint_t aubio_conv2d_check_output_shape(aubio_conv2d_t *c,
  • src/ai/dense.c

    rcba2b12 rbe3164d  
    5353}
    5454
     55#if defined(DEBUG)
    5556void aubio_dense_debug(aubio_dense_t *c, aubio_tensor_t *input_tensor)
    5657{
     
    6162      c->n_units, c->weights->height, c->weights->length, c->bias->length);
    6263}
     64#endif
    6365
    6466uint_t aubio_dense_get_output_shape(aubio_dense_t *c,
     
    7779  if (!c->bias) return AUBIO_FAIL;
    7880
     81#if defined(DEBUG)
    7982  aubio_dense_debug(c, input);
     83#endif
    8084
    8185  return AUBIO_OK;
  • src/ai/maxpool1d.c

    rcba2b12 rbe3164d  
    3131};
    3232
     33#if defined(DEBUG)
    3334static void aubio_maxpool1d_debug(aubio_maxpool1d_t *c,
    3435    aubio_tensor_t *input_tensor);
     36#endif
    3537
    3638aubio_maxpool1d_t *new_aubio_maxpool1d(uint_t pool_size[1])
     
    5658}
    5759
     60#if defined(DEBUG)
    5861void aubio_maxpool1d_debug(aubio_maxpool1d_t *c, aubio_tensor_t *input_tensor)
    5962{
     
    6366      input_tensor->shape[1], c->pool_size);
    6467}
     68#endif
    6569
    6670uint_t aubio_maxpool1d_get_output_shape(aubio_maxpool1d_t *c,
     
    7377  shape[1] = input->shape[1];
    7478
     79#if defined(DEBUG)
    7580  aubio_maxpool1d_debug(c, input);
     81#endif
    7682
    7783  return AUBIO_OK;
  • src/ai/maxpool2d.c

    rcba2b12 rbe3164d  
    3131};
    3232
     33#if defined(DEBUG)
    3334static void aubio_maxpool2d_debug(aubio_maxpool2d_t *c,
    3435    aubio_tensor_t *input_tensor);
     36#endif
    3537
    3638aubio_maxpool2d_t *new_aubio_maxpool2d(uint_t pool_size[2])
     
    5961}
    6062
     63#if defined(DEBUG)
    6164void aubio_maxpool2d_debug(aubio_maxpool2d_t *c, aubio_tensor_t *input_tensor)
    6265{
     
    7073      c->pool_size[1]);
    7174}
     75#endif
    7276
    7377uint_t aubio_maxpool2d_get_output_shape(aubio_maxpool2d_t *c,
     
    8185  shape[2] = input->shape[2];
    8286
     87#if defined(DEBUG)
    8388  aubio_maxpool2d_debug(c, input);
     89#endif
    8490
    8591  return AUBIO_OK;
Note: See TracChangeset for help on using the changeset viewer.