From b645c8d3ffaa944b37a1ca79e439c1dbec9563d8 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sun, 11 Aug 2019 16:30:34 +0200 Subject: [PATCH] Added rounding to limit float precision problems Signed-off-by: Jim Martens --- src/twomartens/masterthesis/ssd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/twomartens/masterthesis/ssd.py b/src/twomartens/masterthesis/ssd.py index 55996dd..22d75e6 100644 --- a/src/twomartens/masterthesis/ssd.py +++ b/src/twomartens/masterthesis/ssd.py @@ -298,7 +298,7 @@ def _predict_loop(generator: Generator, use_dropout: bool, steps_per_epoch: int, saved_images_decoding = False if use_entropy_threshold: nr_steps = math.floor((entropy_threshold_max - entropy_threshold_min) * 10) - entropy_thresholds = [i / 10 + entropy_threshold_min for i in range(nr_steps)] + entropy_thresholds = [round(i / 10 + entropy_threshold_min, 1) for i in range(nr_steps)] else: entropy_thresholds = [0]