This commit is contained in:
Connor Olding 2018-06-08 02:45:07 +02:00
parent 37d404e77d
commit 374fa4d876
4 changed files with 7 additions and 6 deletions

View file

@ -83,5 +83,7 @@ cfg.enable_network = not cfg.playable_mode
assert(not cfg.ars_lips or cfg.unperturbed_trial, assert(not cfg.ars_lips or cfg.unperturbed_trial,
"cfg.unperturbed_trial must be true to use cfg.ars_lips") "cfg.unperturbed_trial must be true to use cfg.ars_lips")
assert(not cfg.ars_lips or cfg.negate_trials,
"cfg.negate_trials must be true to use cfg.ars_lips")
return cfg return cfg

3
nn.lua
View file

@ -67,9 +67,8 @@ local function arange(n, out)
return out return out
end end
local function allocate(t, out, init) local function allocate(size, out, init)
out = out or {} out = out or {}
local size = t
if init ~= nil then if init ~= nil then
return init(zeros(size, out)) return init(zeros(size, out))
else else

View file

@ -8,7 +8,7 @@ local min = math.min
local pairs = pairs local pairs = pairs
local random = math.random local random = math.random
local select = select local select = select
local sqrt= math.sqrt local sqrt = math.sqrt
local function signbyte(x) local function signbyte(x)
if x >= 128 then x = 256 - x end if x >= 128 then x = 256 - x end