diff options
author | 3gg <3gg@shellblade.net> | 2022-05-15 18:22:41 -0700 |
---|---|---|
committer | 3gg <3gg@shellblade.net> | 2022-05-15 18:48:32 -0700 |
commit | 6785bd57a1f75a1984b2bac5da69dcbcb05c1bc2 (patch) | |
tree | 79393ee1069c415e195ba94c42d7bc43cf1b49f3 /src/lib/include | |
parent | e858458e934a9e2fca953be43120497771292304 (diff) |
Optimize away weights_T during training.
Mnist-1000: 18s -> 15s.
Diffstat (limited to 'src/lib/include')
-rw-r--r-- | src/lib/include/neuralnet/matrix.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/include/neuralnet/matrix.h b/src/lib/include/neuralnet/matrix.h index 9816b81..0cb40cf 100644 --- a/src/lib/include/neuralnet/matrix.h +++ b/src/lib/include/neuralnet/matrix.h | |||
@@ -52,6 +52,12 @@ void nnMatrixInitConstant(nnMatrix*, R value); | |||
52 | /// Multiply two matrices. | 52 | /// Multiply two matrices. |
53 | void nnMatrixMul(const nnMatrix* left, const nnMatrix* right, nnMatrix* out); | 53 | void nnMatrixMul(const nnMatrix* left, const nnMatrix* right, nnMatrix* out); |
54 | 54 | ||
55 | /// Multiply two matrices, row variant. | ||
56 | /// | ||
57 | /// This function multiples two matrices row-by-row instead of row-by-column. | ||
58 | /// nnMatrixMul(A, B, O) == nnMatrixMulRows(A, B^T, O). | ||
59 | void nnMatrixMulRows(const nnMatrix* left, const nnMatrix* right, nnMatrix* out); | ||
60 | |||
55 | /// Matrix multiply-add. | 61 | /// Matrix multiply-add. |
56 | /// | 62 | /// |
57 | /// out = left + (right * scale) | 63 | /// out = left + (right * scale) |