move actreg tweaking into if statement

i was getting division by zero.
This commit is contained in:
Connor Olding 2017-09-16 17:33:47 +00:00
parent 65ba80bb96
commit 3386869b30

View File

@ -220,8 +220,8 @@ def measure_error(quiet=False):
measure_error()
while learner.next():
act_t = (learner.epoch - 1) / (learner.epochs - 1)
if actreg_lamb:
act_t = (learner.epoch - 1) / (learner.epochs - 1)
for node in model.ordered_nodes:
if isinstance(node, ActivityRegularizer):
node.reg.lamb = act_t * node.reg.lamb_orig # HACK