You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

TopKCategoricalAccuracy.cs 427 B

123456789101112
  1. namespace Tensorflow.Keras.Metrics;
  2. public class TopKCategoricalAccuracy : MeanMetricWrapper
  3. {
  4. public TopKCategoricalAccuracy(int k = 5, string name = "top_k_categorical_accuracy", TF_DataType dtype = TF_DataType.TF_FLOAT)
  5. : base((yt, yp) => metrics_utils.sparse_top_k_categorical_matches(
  6. tf.math.argmax(yt, axis: -1), yp, k),
  7. name: name,
  8. dtype: dtype)
  9. {
  10. }
  11. }