- Timestamp:
- Jan 8, 2019, 12:05:26 AM (6 years ago)
- Branches:
- feature/cnn_org, feature/crepe_org
- Children:
- 7420c40
- Parents:
- 1768cdb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ai/maxpool1d.c
r1768cdb rf9f03ff 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.