From fe026097b171d411c376fb0afb5d11b3354676fc Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 13 Oct 2018 14:40:19 +0100 Subject: [PATCH] [Minor] Always set number of threads when performing learn --- src/plugins/lua/neural.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/lua/neural.lua b/src/plugins/lua/neural.lua index 022160083..2d659474e 100644 --- a/src/plugins/lua/neural.lua +++ b/src/plugins/lua/neural.lua @@ -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() -- 2.39.5