]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Always set number of threads when performing learn
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 13 Oct 2018 13:40:19 +0000 (14:40 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 13 Oct 2018 13:40:19 +0000 (14:40 +0100)
src/plugins/lua/neural.lua

index 022160083260de26fd56a0e8ae7ced43c5ef9516..2d659474eb6f7bab3abd54729bd2da13c2ea558e 100644 (file)
@@ -659,7 +659,7 @@ local function train_ann(rule, _, ev_base, elt, worker)
           dataset.size = function() return #dataset end
 
           local function train_torch()
-            if rule.train.learn_threads > 1 then
+            if rule.train.learn_threads then
               torch.setnumthreads(rule.train.learn_threads)
             end
             local criterion = nn.MSECriterion()