Changeset 60c9db0


Ignore:
Timestamp:
Jan 1, 2019, 6:39:56 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn_org, feature/crepe_org
Children:
9d35014
Parents:
6e4ef27
Message:

[maxpool1d] update to new tensor members

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ai/maxpool1d.c

    r6e4ef27 r60c9db0  
    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.