mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-22 01:12:59 +00:00
dataset: properly resize
This commit is contained in:
parent
c78b6562ef
commit
9f7f4af784
1 changed files with 1 additions and 2 deletions
|
@ -28,8 +28,7 @@ def parse_item(metadata):
|
|||
rainfall = tf.transpose(rainfall, [1, 2, 0])
|
||||
# [width, height] → [width, height, channels]
|
||||
water = tf.expand_dims(water, axis=-1)
|
||||
# BUG: AttributeError: 'dict' object has no attribute 'waterdepth
|
||||
rainfall = tf.image.resize(rainfall, tf.constant(metadata["waterdepth"]))
|
||||
rainfall = tf.image.resize(rainfall, tf.cast(tf.constant(metadata["waterdepth"]) / 2, dtype=tf.int32))
|
||||
|
||||
# TODO: The shape of the resulting tensor can't be statically determined, so we need to reshape here
|
||||
print("DEBUG:dataset ITEM rainfall:shape", rainfall.shape, "water:shape", water.shape)
|
||||
|
|
Loading…
Reference in a new issue