From 3386869b309cedb52b392380275e110c0ce51cd0 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 16 Sep 2017 17:33:47 +0000 Subject: [PATCH] move actreg tweaking into if statement i was getting division by zero. --- onn_mnist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onn_mnist.py b/onn_mnist.py index fa5712a..1cff3b7 100755 --- a/onn_mnist.py +++ b/onn_mnist.py @@ -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