aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_kann.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-08-28 17:37:38 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-08-28 17:37:38 +0100
commit545deadb7e1f392478e1537aee5d3b1c39b358f9 (patch)
tree846dc97d06fb6cc5ce7b8f57d4d572552b92bde0 /src/lua/lua_kann.c
parentd72a81792df5bb6d72da185b6d86765664a2fa7c (diff)
downloadrspamd-545deadb7e1f392478e1537aee5d3b1c39b358f9.tar.gz
rspamd-545deadb7e1f392478e1537aee5d3b1c39b358f9.zip
[Project] Neural: Fix matrix gemm
Diffstat (limited to 'src/lua/lua_kann.c')
-rw-r--r--src/lua/lua_kann.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lua/lua_kann.c b/src/lua/lua_kann.c
index 30bff538a..b5ddc55f2 100644
--- a/src/lua/lua_kann.c
+++ b/src/lua/lua_kann.c
@@ -1140,9 +1140,9 @@ lua_kann_train1 (lua_State *L)
lua_pop (L, 1);
}
- kad_sgemm_simple (0, 0, pca->dim[0], 1,
- pca->dim[1], pca->data,
- tmp_row, x[s]);
+ kad_sgemm_simple (0, 1, 1, n_in,
+ pca->dim[1], tmp_row, pca->data,
+ x[s]);
}
lua_pop (L, 1);
@@ -1267,9 +1267,9 @@ lua_kann_apply1 (lua_State *L)
if (pca) {
pca_out = g_malloc (sizeof (float) * n_in);
- kad_sgemm_simple (0, 0, pca->dim[0], 1,
- pca->dim[1], pca->data,
- vec, pca_out);
+ kad_sgemm_simple (0, 1, 1, n_in,
+ vec_len, vec, pca->data,
+ pca_out);
kann_feed_bind (k, KANN_F_IN, 0, &pca_out);
}