aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-03 14:02:44 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-03 14:02:44 +0100
commit31fa076b50d0600c6c12c36ad892eaf3735e4e75 (patch)
tree16db931a621260e0864f656d720893d24fe432d2 /src
parent242269c12afc214da1c75954a3f5b167d2faba40 (diff)
downloadrspamd-31fa076b50d0600c6c12c36ad892eaf3735e4e75.tar.gz
rspamd-31fa076b50d0600c6c12c36ad892eaf3735e4e75.zip
[Minor] Neural: Fix training with kann
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/neural.lua4
1 files 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