Changeset 97985d4 for src/ai


Ignore:
Timestamp:
Dec 29, 2021, 5:51:45 PM (3 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe
Children:
6ad67a5
Parents:
f4c5a95
git-author:
Paul Brossier <piem@piem.org> (01/01/19 18:39:56)
git-committer:
Paul Brossier <piem@piem.org> (12/29/21 17:51:45)
Message:

[maxpool1d] update to new tensor members

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ai/maxpool1d.c

    rf4c5a95 r97985d4  
    6060  AUBIO_DBG("maxpool1d: input (%d, %d) ¤ maxpool1d (pool_size = (%d)) ->"
    6161      " (%d, %d) (no params)\n",
    62       input_tensor->dims[0],
    63       input_tensor->dims[1],
     62      input_tensor->shape[0],
     63      input_tensor->shape[1],
    6464      c->pool_size,
    65       input_tensor->dims[0] / c->pool_size,
    66       input_tensor->dims[1]);
     65      input_tensor->shape[0] / c->pool_size,
     66      input_tensor->shape[1]);
    6767}
    6868
     
    7373  AUBIO_ASSERT(shape && sizeof(shape) == 2*sizeof(uint_t));
    7474  AUBIO_ASSERT(input);
    75   shape[0] = input->dims[0] / c->pool_size;
    76   shape[1] = input->dims[1];
     75  shape[0] = input->shape[0] / c->pool_size;
     76  shape[1] = input->shape[1];
    7777
    7878  aubio_maxpool1d_debug(c, input);
     
    8787  AUBIO_ASSERT(c && input_tensor && output_tensor);
    8888
    89   for (j = 0; j < output_tensor->dims[1]; j++) {
    90     for (i = 0; i < output_tensor->dims[0]; i++) {
     89  //aubio_maxpool1d_debug(c, input_tensor);
     90
     91  for (j = 0; j < output_tensor->shape[1]; j++) {
     92    for (i = 0; i < output_tensor->shape[0]; i++) {
    9193      smpl_t m = -FLT_MAX;
    9294      for (a = 0; a < c->pool_size; a++) {
Note: See TracChangeset for help on using the changeset viewer.