mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-12-22 22:25:01 +00:00
WHY. * facepalms *
This commit is contained in:
parent
57b8eb93fb
commit
dba6cbffcd
4 changed files with 5 additions and 3 deletions
|
@ -18,7 +18,7 @@ class LossCrossentropy(tf.keras.losses.Loss):
|
|||
result = tf.keras.metrics.categorical_crossentropy(y_true, y_pred)
|
||||
result_reduce = tf.math.reduce_sum(result)
|
||||
label_nowater = tf.math.reduce_sum(tf.argmax(y_true, axis=-1))
|
||||
tf.print("DEBUG:TFPRINT:loss LABEL", y_true.shape, y_true, "LABEL_ARGMAX_COUNT_AXIS0", label_nowater, "PREDICT", y_pred.shape, y_pred, "BEFORE_REDUCE", result.shape, result, "AFTER_REDUCE", result_reduce.shape, result_reduce)
|
||||
# tf.print("DEBUG:TFPRINT:loss LABEL", y_true.shape, y_true, "LABEL_ARGMAX_COUNT_AXIS0", label_nowater, "PREDICT", y_pred.shape, y_pred, "BEFORE_REDUCE", result.shape, result, "AFTER_REDUCE", result_reduce.shape, result_reduce)
|
||||
return result
|
||||
|
||||
def get_config(self):
|
||||
|
|
|
@ -22,6 +22,8 @@ def parse_item(metadata, shape_water_desired=[100,100], water_threshold=0.1, wat
|
|||
|
||||
print("DEBUG DATASET:rainfall shape", metadata["rainfallradar"])
|
||||
print("DEBUG DATASET:water shape", metadata["waterdepth"])
|
||||
print("DEBUG DATASET:water_threshold", water_threshold)
|
||||
print("DEBUG DATASET:water_bins", water_bins)
|
||||
|
||||
def parse_item_inner(item):
|
||||
parsed = tf.io.parse_single_example(item, features={
|
||||
|
|
|
@ -33,7 +33,7 @@ def run(args):
|
|||
if (not hasattr(args, "read_multiplier")) or args.read_multiplier == None:
|
||||
args.read_multiplier = 1.5
|
||||
if (not hasattr(args, "water_threshold")) or args.water_threshold == None:
|
||||
args.water_threshold = 1.5
|
||||
args.water_threshold = 0.1
|
||||
if (not hasattr(args, "water_size")) or args.water_size == None:
|
||||
args.water_size = 1.5
|
||||
if (not hasattr(args, "arch")) or args.arch == None:
|
||||
|
|
|
@ -34,7 +34,7 @@ def run(args):
|
|||
if (not hasattr(args, "read_multiplier")) or args.read_multiplier == None:
|
||||
args.read_multiplier = 1.5
|
||||
if (not hasattr(args, "water_threshold")) or args.water_threshold == None:
|
||||
args.water_threshold = 1.5
|
||||
args.water_threshold = 0.1
|
||||
if (not hasattr(args, "water_size")) or args.water_size == None:
|
||||
args.water_size = 1.5
|
||||
if (not hasattr(args, "bottleneck")) or args.bottleneck == None:
|
||||
|
|
Loading…
Reference in a new issue