commit 31fa076: [Minor] Neural: Fix training with kann

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Jul 3 13:07:03 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-07-03 14:02:44 +0100
URL: https://github.com/rspamd/rspamd/commit/31fa076b50d0600c6c12c36ad892eaf3735e4e75 (HEAD -> master)

[Minor] Neural: Fix training with kann

---
 src/plugins/lua/neural.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/plugins/lua/neural.lua b/src/plugins/lua/neural.lua
index 193b07614..5f9b1f9d2 100644
--- a/src/plugins/lua/neural.lua
+++ b/src/plugins/lua/neural.lua
@@ -551,13 +551,13 @@ local function train_ann(rule, _, ev_base, elt, worker)
         for _,e in ipairs(spam_elts) do
           if e == e then
             inputs[#inputs + 1] = e
-            outputs[#outputs + 1] = 1.0
+            outputs[#outputs + 1] = {1.0}
           end
         end
         for _,e in ipairs(ham_elts) do
           if e == e then
             inputs[#inputs + 1] = e
-            outputs[#outputs + 1] = 0.0
+            outputs[#outputs + 1] = {0.0}
           end
         end
 


More information about the Commits mailing list