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,
"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

View File

@ -14,9 +14,9 @@ local trial_neg = true
local trial_noise = {}
local trial_rewards = {}
local trials_remaining = 0
local mom1 -- first moments in AMSgrad.
local mom2 -- second moments in AMSgrad.
local mom2max -- running element-wise maximum of mom2.
local mom1 -- first moments in AMSgrad.
local mom2 -- second moments in AMSgrad.
local mom2max -- running element-wise maximum of mom2.
local trial_frames = 0
local total_frames = 0

3
nn.lua
View File

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

View File

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