Skip to content

Commit 2109063

Browse files
committed
Fix FBetaScore data type issue.
1 parent 3b0cdd8 commit 2109063

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TensorFlowNET.Keras/Metrics/FBetaScore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public override Tensor update_state(Tensor y_true, Tensor y_pred, Tensor sample_
5353
_threshold = tf.reduce_max(y_pred, axis: -1, keepdims: true);
5454
// make sure [0, 0, 0] doesn't become [1, 1, 1]
5555
// Use abs(x) > eps, instead of x != 0 to check for zero
56-
y_pred = tf.logical_and(y_pred >= _threshold, tf.abs(y_pred) > 1e-12);
56+
y_pred = tf.logical_and(y_pred >= _threshold, tf.abs(y_pred) > 1e-12f);
5757
}
5858
else
5959
{

0 commit comments

Comments
 (0)