From 3dde9b69da6e6cdcb3abf4a47f3ad1134dc78e68 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 8 Dec 2022 18:56:32 +0000 Subject: [PATCH] fixup --- aimodel/src/lib/dataset/dataset_mono.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aimodel/src/lib/dataset/dataset_mono.py b/aimodel/src/lib/dataset/dataset_mono.py index 9820e35..d2f3a0f 100644 --- a/aimodel/src/lib/dataset/dataset_mono.py +++ b/aimodel/src/lib/dataset/dataset_mono.py @@ -30,7 +30,7 @@ def parse_item(metadata, shape_water_desired=[100,100], water_threshold=0.1, wat heightmap = tf.expand_dims(heightmap, axis=-1) # NORMALLY, this wouldn't work 'cause you'd need to know the max of ALL frames, but here we only have a single frame. heightmap_max = tf.math.reduce_max(heightmap) - heightmap_min = tf.math.reduce_min(tf.where(tf.math.less(heightmap, -500.0), heightmap, tf.fill(heightmap.shape, 0))) + heightmap_min = tf.math.reduce_min(tf.where(tf.math.less(heightmap, -500), heightmap, tf.fill(heightmap.shape, 0.0))) heightmap = (heightmap - heightmap_min) / heightmap_max def parse_item_inner(item):