insignificant tweaks

This commit is contained in:
Connor Olding 2018-06-10 16:41:32 +02:00
parent 70742ccf93
commit 401effbc23
2 changed files with 5 additions and 2 deletions

View File

@ -4,6 +4,7 @@ however, feel free to copy any snippets of code you find useful.
TODOs: (that i can remember right now)
- normalize `for i=a,b` code style
- count decisions made onscreen instead of partial frame count?
- normalize and/or embed sprite type inputs
- settle on a network architecture
- compute how many input neurons the network needs instead of hardcoding

View File

@ -276,8 +276,10 @@ local function learn_from_epoch()
base_params = es:params()
for i, v in ipairs(base_params) do
base_params[i] = v * (1 - cfg.weight_decay)
if cfg.weight_decay > 0 then
for i, v in ipairs(base_params) do
base_params[i] = v * (1 - cfg.weight_decay)
end
end
es:params(base_params)