]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Revert layers number change: output layer is added explicitly
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 31 Jul 2017 17:34:10 +0000 (18:34 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 31 Jul 2017 17:34:10 +0000 (18:34 +0100)
src/plugins/lua/fann_redis.lua

index 42c691d3758cc0c30e4741e44f62a0bea9b2a2f3..65d354b21540b70e743ad63c04e2cdf4f90bd92e 100644 (file)
@@ -361,7 +361,7 @@ end
 local function create_fann(n, nlayers)
   local layers = {}
   local div = 1.0
-  for _ = 1, nlayers do
+  for _ = 1, nlayers - 1 do
     table.insert(layers, math.floor(n / div))
     div = div * 2
   end