Browse Source

Fix FBetaScore data type issue.

tags/v0.100.4-load-saved-model
Haiping Chen 2 years ago
parent
commit
2109063386
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/TensorFlowNET.Keras/Metrics/FBetaScore.cs

+ 1
- 1
src/TensorFlowNET.Keras/Metrics/FBetaScore.cs View File

@@ -53,7 +53,7 @@ public class FBetaScore : Metric
_threshold = tf.reduce_max(y_pred, axis: -1, keepdims: true);
// make sure [0, 0, 0] doesn't become [1, 1, 1]
// Use abs(x) > eps, instead of x != 0 to check for zero
y_pred = tf.logical_and(y_pred >= _threshold, tf.abs(y_pred) > 1e-12);
y_pred = tf.logical_and(y_pred >= _threshold, tf.abs(y_pred) > 1e-12f);
}
else
{


Loading…
Cancel
Save