mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-22 01:12:59 +00:00
dataset_segmenter: squeeze
This commit is contained in:
parent
2258b5a229
commit
77b8a1a8db
1 changed files with 1 additions and 0 deletions
|
@ -35,6 +35,7 @@ def parse_item(metadata, shape_water_desired, water_threshold=0.1, water_bins=2)
|
|||
water = tf.cast(tf.math.greater_equal(water, water_threshold), dtype=tf.int32)
|
||||
|
||||
water = tf.image.crop_to_bounding_box(water, water_offset_x, water_offset_y, water_width_target, water_height_target)
|
||||
water = tf.squeeze(water)
|
||||
water = tf.one_hot(water, water_bins, axis=-1, dtype=tf.int32)
|
||||
print("DEBUG:dataset ITEM rainfall:shape", rainfall.shape, "water:shape", water.shape)
|
||||
|
||||
|
|
Loading…
Reference in a new issue