Skip to content

Commit d1a896d

Browse files
committed
softmax_cross_entropy supports TF and TF.compat.v1
1 parent 5c4171f commit d1a896d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

deepxde/losses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def zero(*_):
2222

2323
mean_absolute_error = tf.keras.losses.MeanAbsoluteError()
2424
mean_absolute_percentage_error = tf.keras.losses.MeanAbsolutePercentageError()
25-
softmax_cross_entropy = tf.losses.softmax_cross_entropy
25+
softmax_cross_entropy = tf.keras.losses.CategoricalCrossentropy(from_logits=True)
2626

2727

2828
def get(identifier):

0 commit comments

Comments
 (0)