- Timestamp:
- Jan 8, 2019, 3:12:35 PM (6 years ago)
- Branches:
- feature/cnn_org, feature/crepe_org
- Children:
- 3ffea61d
- Parents:
- 6ee6107
- Location:
- src/ai
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ai/conv2d.c
r6ee6107 r45a1e1d 66 66 c->padding_mode = PAD_VALID; 67 67 // set default stride_shape to {1, 1} 68 aubio_conv2d_set_stride(c, 1, 1); 68 { 69 uint_t default_stride[2] = {1, 1}; 70 aubio_conv2d_set_stride(c, default_stride); 71 } 69 72 70 73 return c; … … 89 92 90 93 uint_t aubio_conv2d_set_stride(aubio_conv2d_t *c, 91 uint_t stride 1, uint_t stride2)92 { 93 if ((sint_t)stride 1< 1) return AUBIO_FAIL;94 if ((sint_t)stride 2< 1) return AUBIO_FAIL;95 c->stride_shape[0] = stride 1;96 c->stride_shape[1] = stride 2;94 uint_t stride[2]) 95 { 96 if ((sint_t)stride[0] < 1) return AUBIO_FAIL; 97 if ((sint_t)stride[1] < 1) return AUBIO_FAIL; 98 c->stride_shape[0] = stride[0]; 99 c->stride_shape[1] = stride[1]; 97 100 return AUBIO_OK; 98 101 } … … 191 194 * c->kernel->shape[1] * c->kernel->shape[3]; 192 195 193 AUBIO_DBG("conv2d: input %s ¤ conv2d %s"196 AUBIO_DBG("conv2d: %15s ¤ conv2d %s" 194 197 " : (%d, %d, %d)" 195 198 " (%d params, stride (%d, %d), pad_start [%d, %d])\n", -
src/ai/conv2d.h
r6ee6107 r45a1e1d 52 52 /** set conv2d stride */ 53 53 uint_t aubio_conv2d_set_stride(aubio_conv2d_t *c, 54 uint_t stride 1, uint_t stride2);54 uint_t stride[2]); 55 55 56 56 uint_t *aubio_conv2d_get_stride(aubio_conv2d_t* t);
Note: See TracChangeset
for help on using the changeset viewer.