losscrossentropy: return the reduced value * facepalm *

This commit is contained in:
Starbeamrainbowlabs 2022-11-29 19:07:08 +00:00
parent ff65393e78
commit 01101ad30b
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -19,7 +19,7 @@ class LossCrossentropy(tf.keras.losses.Loss):
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)
return result
return result_reduce
def get_config(self):
config = super(LossCrossentropy, self).get_config()