almost got it....? it's not what I expected....!

This commit is contained in:
Starbeamrainbowlabs 2022-11-28 19:08:50 +00:00
parent f48473b703
commit 6640a41bb7
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -17,6 +17,7 @@ class LossCrossentropy(tf.keras.losses.Loss):
def call(self, y_true, y_pred):
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, "PREDICT", y_pred.shape, y_pred, "BEFORE_REDUCE", result.shape, result, "AFTER_REDUCE", result_reduce.shape, result_reduce)
return result