Changeset 3977b4f
 Timestamp:
 Jan 18, 2019, 12:28:29 AM (5 years ago)
 Branches:
 feature/crepe_org
 Children:
 689ba93
 Parents:
 fa90792
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/ai/batchnorm.c
rfa90792 r3977b4f 131 131 uint_t aubio_batchnorm_set_beta(aubio_batchnorm_t *t, fvec_t *beta) 132 132 { 133 AUBIO_ASSERT(t && t>beta );134 AUBIO_ASSERT(beta);135 if (t>beta>length != beta>length)return AUBIO_FAIL;133 AUBIO_ASSERT(t && t>beta && beta); 134 if (t>beta>length != beta>length) 135 return AUBIO_FAIL; 136 136 fvec_copy(beta, t>beta); 137 137 return AUBIO_OK; 138 138 } 139 139 140 uint_t aubio_batchnorm_set_moving_mean(aubio_batchnorm_t *t, fvec_t *moving_mean) 140 uint_t aubio_batchnorm_set_moving_mean(aubio_batchnorm_t *t, 141 fvec_t *moving_mean) 141 142 { 142 143 AUBIO_ASSERT(t && t>moving_mean); 143 144 AUBIO_ASSERT(moving_mean); 144 if (t>moving_mean>length != moving_mean>length) return AUBIO_FAIL; 145 if (t>moving_mean>length != moving_mean>length) 146 return AUBIO_FAIL; 145 147 fvec_copy(moving_mean, t>moving_mean); 146 148 return AUBIO_OK; 147 149 } 148 150 149 uint_t aubio_batchnorm_set_moving_variance(aubio_batchnorm_t *t, fvec_t *moving_variance) 151 uint_t aubio_batchnorm_set_moving_variance(aubio_batchnorm_t *t, 152 fvec_t *moving_variance) 150 153 { 151 154 AUBIO_ASSERT(t && t>moving_variance); 152 155 AUBIO_ASSERT(moving_variance); 153 if (t>moving_variance>length != moving_variance>length) return AUBIO_FAIL; 156 if (t>moving_variance>length != moving_variance>length) 157 return AUBIO_FAIL; 154 158 fvec_copy(moving_variance, t>moving_variance); 155 159 return AUBIO_OK;
Note: See TracChangeset
for help on using the changeset viewer.