- Timestamp:
- Dec 29, 2021, 5:51:47 PM (3 years ago)
- Branches:
- feature/cnn, feature/crepe
- Children:
- bacf0c6
- Parents:
- 83ef8f0
- git-author:
- Paul Brossier <piem@piem.org> (01/07/19 22:19:48)
- git-committer:
- Paul Brossier <piem@piem.org> (12/29/21 17:51:47)
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/fvec.c
r83ef8f0 r567727d 99 99 } 100 100 101 void fvec_vecadd(fvec_t *s, const fvec_t *bias) { 102 uint_t j; 103 uint_t length = MIN(s->length, bias->length); 104 for (j = 0; j < length; j++) { 105 s->data[j] += bias->data[j]; 106 } 107 } 108 101 109 void fvec_weight(fvec_t *s, const fvec_t *weight) { 102 110 uint_t length = MIN(s->length, weight->length); -
src/fvec.h
r83ef8f0 r567727d 144 144 void fvec_rev(fvec_t *s); 145 145 146 /** add a vector b to vector a, modifying a 147 148 \param a input vector to add b to 149 \param b input vector of the values to be added to a 150 151 Upon return, he content of a[i] will be set to a[i] + b[i]. 152 153 */ 154 void fvec_vecadd(fvec_t *a, const fvec_t *b); 155 146 156 /** apply weight to vector 147 157
Note: See TracChangeset
for help on using the changeset viewer.