aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/nerv_matrix.md8
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
<ted.sybil@gmail.com> 2019-02-10 20:01:42 -0500 render graph data in background; other improvements' href='/chromicle/commit/dist/popup.js?id=8a0f7d58a136e87f71b790bbbb489af111472796'>8a0f7d5 ^
d017bbd ^
8a0f7d5 ^






d017bbd ^
8a0f7d5 ^






d017bbd ^
495e0d4 ^






d017bbd ^
495e0d4 ^







d017bbd ^
0d665c8 ^







d017bbd ^
495e0d4 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80