mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-25 18:33:01 +00:00
fixup
This commit is contained in:
parent
ace4c8b246
commit
7e8f63f8ba
1 changed files with 2 additions and 2 deletions
|
@ -49,9 +49,9 @@ def parse_item(metadata, shape_water_desired=[100,100], water_threshold=0.1, wat
|
||||||
water = tf.expand_dims(water, axis=-1) # [width, height] → [width, height, channels=1]
|
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)
|
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")
|
print("DEBUG:dataset BEFORE_SQUEEZE water", water.shape)
|
||||||
water = tf.squeeze(water)
|
water = tf.squeeze(water)
|
||||||
print("DEBUG:dataset water AFTER_SQUEEZE")
|
print("DEBUG:dataset AFTER_SQUEEZE water", water.shape)
|
||||||
water = tf.cast(tf.math.greater_equal(water, water_threshold), dtype=tf.int32)
|
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)
|
water = tf.one_hot(water, water_bins, axis=-1, dtype=tf.int32)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue