From: Vsevolod Stakhov Date: Mon, 31 Jul 2017 17:34:10 +0000 (+0100) Subject: [Minor] Revert layers number change: output layer is added explicitly X-Git-Tag: 1.7.0~778 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=12bdbf8bc984ca020ad9bd578de24c70d59c98bd;p=thirdparty%2Frspamd.git [Minor] Revert layers number change: output layer is added explicitly --- diff --git a/src/plugins/lua/fann_redis.lua b/src/plugins/lua/fann_redis.lua index 42c691d375..65d354b215 100644 --- a/src/plugins/lua/fann_redis.lua +++ b/src/plugins/lua/fann_redis.lua @@ -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