]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Neural: Fix training with kann
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 3 Jul 2019 13:02:44 +0000 (14:02 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 3 Jul 2019 13:02:44 +0000 (14:02 +0100)
src/plugins/lua/neural.lua

index 193b076144ce48b32f412f01ee5043dafa331127..5f9b1f9d2af9738c274d997fecf601a9959ae029 100644 (file)
@@ -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