From ace4c8b246f22c7d3f408389ecdeb4a889118f12 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 21 Nov 2022 18:46:21 +0000 Subject: [PATCH] dataset_mono: debug --- aimodel/src/lib/dataset/dataset_mono.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aimodel/src/lib/dataset/dataset_mono.py b/aimodel/src/lib/dataset/dataset_mono.py index db4e341..d750716 100644 --- a/aimodel/src/lib/dataset/dataset_mono.py +++ b/aimodel/src/lib/dataset/dataset_mono.py @@ -46,11 +46,12 @@ def parse_item(metadata, shape_water_desired=[100,100], water_threshold=0.1, wat rainfall = tf.transpose(rainfall, [2, 1, 0]) # rainfall = tf.image.resize(rainfall, tf.cast(tf.constant(metadata["rainfallradar"]) / 2, dtype=tf.int32)) - water = tf.expand_dims(water, axis=-1) # [width, height] → [width, height, channels=1] water = tf.image.crop_to_bounding_box(water, water_offset_x, water_offset_y, water_width_target, water_height_target) + print("DEBUG:dataset water BEFORE_SQUEEZE") water = tf.squeeze(water) + print("DEBUG:dataset water AFTER_SQUEEZE") water = tf.cast(tf.math.greater_equal(water, water_threshold), dtype=tf.int32) water = tf.one_hot(water, water_bins, axis=-1, dtype=tf.int32)