diff options
author | cloudygoose <[email protected]> | 2015-06-03 18:30:38 +0800 |
---|---|---|
committer | cloudygoose <[email protected]> | 2015-06-03 18:30:38 +0800 |
commit | 5c018e6065d415183b23ed1d68bb4092e0bd89ea (patch) | |
tree | 3255b23eef31ecd97d165d98e8a6bd1d83d4c939 /doc/nerv_matrix.md | |
parent | cb17b5715683a56459ba8097446fa11b0fc325ca (diff) |
doc change for matrix
Diffstat (limited to 'doc/nerv_matrix.md')
-rw-r--r-- | doc/nerv_matrix.md | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/nerv_matrix.md b/doc/nerv_matrix.md index ef5118e..2edf691 100644 --- a/doc/nerv_matrix.md +++ b/doc/nerv_matrix.md @@ -82,4 +82,10 @@ Calculate element-wise multiplication of __Matrix__ `ma` and `mb`, store the res * __void Matrix.log_elem(Matrix self, Matrix ma)__ Calculate element-wise log of __Matrix__ `ma`, store the result in `self`. * __void Matrix.copy_rows_fromh_by_idx(Matrix self, MMatrix ma, MMatrixInt idx)__ -`idx` should be a row vector. This function copy the rows of `ma` to `self` according to `idx`, in other words, it assigns `ma[idx[i]]` to `self[i]`.
\ No newline at end of file +`idx` should be a row vector. This function copy the rows of `ma` to `self` according to `idx`, in other words, it assigns `ma[idx[i]]` to `self[i]`. +* __void Matrix.expand_frm(Matrix self, Matrix a, int context)__ +Treating each row of `a` as speech feature, and do a feature expansion. The `self` should of size `(a.nrow, a.ncol * (context * 2 + 1))`. `self[i]` will be `(a[i-context] a[i-context+1] ... a[i] a[i+1] a[i+context])`. `a[0]` and `a[nrow]` will be copied to extend the index range. +* __void Matrix.rearrange_frm(Matrix self, Matrix a, int step)__ +Rearrange `a` according to its feature dimension. The `step` is the length of context. So, `self[i][j]` will be assigned `a[i][j / step + (j % step) * (a.ncol / step)]`. `a` and `self` should be of the same size and `step` should be divisible by `a.ncol`. +* __void Matrix.scale_row(Matrix self, Matrix scale)__ +Scale each column of `self` according to a vector `scale`. `scale` should be of size `1 * self.ncol`.
\ No newline at end of file |