Changeset 6c39d11
- Timestamp:
- Dec 29, 2021, 5:51:48 PM (3 years ago)
- Branches:
- feature/cnn, feature/crepe
- Children:
- 3cbcc40
- Parents:
- b9616b0
- git-author:
- Paul Brossier <piem@piem.org> (01/08/19 00:05:26)
- git-committer:
- Paul Brossier <piem@piem.org> (12/29/21 17:51:48)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ai/maxpool1d.c
rb9616b0 r6c39d11 91 91 for (j = 0; j < output_tensor->shape[1]; j++) { 92 92 for (i = 0; i < output_tensor->shape[0]; i++) { 93 smpl_t m = -FLT_MAX; 93 uint_t stride_i = i * c->pool_size; 94 smpl_t m = input_tensor->data[stride_i][j]; 94 95 for (a = 0; a < c->pool_size; a++) { 95 m = MAX(m, input_tensor->data[ i * c->pool_size+ a][j]);96 m = MAX(m, input_tensor->data[stride_i + a][j]); 96 97 } 97 98 output_tensor->data[i][j] = m;
Note: See TracChangeset
for help on using the changeset viewer.