Changeset 636bc43 for src/ai/conv2d.c
- Timestamp:
- Dec 29, 2021, 5:52:02 PM (3 years ago)
- Branches:
- feature/crepe
- Children:
- 1666945
- Parents:
- c78f151
- git-author:
- Paul Brossier <piem@piem.org> (01/29/19 03:36:35)
- git-committer:
- Paul Brossier <piem@piem.org> (12/29/21 17:52:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ai/conv2d.c
rc78f151 r636bc43 479 479 uint_t aubio_conv2d_set_kernel(aubio_conv2d_t *c, aubio_tensor_t *kernel) 480 480 { 481 uint_t i;482 481 AUBIO_ASSERT(c && kernel); 483 for (i = 0; i < c->kernel->ndim; i++) { 484 AUBIO_ASSERT(c->kernel->shape[i] == kernel->shape[i]); 485 } 486 return AUBIO_OK; 482 if (aubio_tensor_have_same_shape(kernel, c->kernel)) { 483 aubio_tensor_copy(kernel, c->kernel); 484 return AUBIO_OK; 485 } 486 return AUBIO_FAIL; 487 487 } 488 488 … … 496 496 { 497 497 AUBIO_ASSERT(c && bias); 498 AUBIO_ASSERT(c->kernel_shape[1] == bias->length); 498 if (bias->length == c->bias->length) { 499 fvec_copy(bias, c->bias); 500 return AUBIO_OK; 501 } 499 502 return AUBIO_OK; 500 503 }
Note: See TracChangeset
for help on using the changeset viewer.