]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Another try to fix change in symbols
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 22 Nov 2016 12:49:52 +0000 (12:49 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 22 Nov 2016 12:49:52 +0000 (12:49 +0000)
src/plugins/lua/fann_redis.lua

index 49aeb113c0f544da4e593ab2ec5a62f321f8bd94..64d1bf142bd6eea6b9e238438e52552d02ce1538 100644 (file)
@@ -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)