Update parse_log.py
authorManuel <mlopezantequera@users.noreply.github.com>
Mon, 22 Jun 2015 09:49:45 +0000 (11:49 +0200)
committerManuel <mlopezantequera@users.noreply.github.com>
Mon, 22 Jun 2015 09:49:45 +0000 (11:49 +0200)
Correct parsing (exponential notation learning rates were not being interpreted correctly)

tools/extra/parse_log.py

index 09ea216..48f9bee 100755 (executable)
@@ -28,7 +28,7 @@ def parse_log(path_to_log):
     regex_iteration = re.compile('Iteration (\d+)')
     regex_train_output = re.compile('Train net output #(\d+): (\S+) = ([\.\deE+-]+)')
     regex_test_output = re.compile('Test net output #(\d+): (\S+) = ([\.\deE+-]+)')
-    regex_learning_rate = re.compile('lr = ([\.\d]+)')
+    regex_learning_rate = re.compile('lr = ([-+]?[0-9]*\.?[0-9]+([eE]?[-+]?[0-9]+)?)')
 
     # Pick out lines of interest
     iteration = -1