Changeset e18c30e for src/ai/conv2d.c
- Timestamp:
- Jan 29, 2019, 3:36:35 AM (6 years ago)
- Branches:
- feature/crepe_org
- Children:
- bf3ce2c
- Parents:
- 7048b56
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ai/conv2d.c
r7048b56 re18c30e 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.