From cbe6a496c594b6766f7f807bec0c2ee5e265ccca Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 22 Nov 2016 12:49:52 +0000 Subject: [PATCH] [Minor] Another try to fix change in symbols --- src/plugins/lua/fann_redis.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/fann_redis.lua b/src/plugins/lua/fann_redis.lua index 49aeb113c..64d1bf142 100644 --- a/src/plugins/lua/fann_redis.lua +++ b/src/plugins/lua/fann_redis.lua @@ -283,7 +283,8 @@ local function create_train_fann(n, id) end if fanns[id].fann then - if n ~= fanns[id].fann:get_inputs() then + if n ~= fanns[id].fann:get_inputs() or + (fanns[id].fann_train and n ~= fanns[id].fann_train:get_inputs()) then rspamd_logger.infox(rspamd_config, 'recreate ANN %s as it has a wrong number of inputs, version %s', id, fanns[id].version) fanns[id].fann_train = rspamd_fann.create(nlayers, n, n / 2, n / 4, 1) -- 2.39.5