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.

BinaryCrossentropy.cs 532 B

12345678910111213141516171819
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Tensorflow.Keras.Metrics
  5. {
  6. public class BinaryCrossentropy : MeanMetricWrapper
  7. {
  8. public BinaryCrossentropy(string name = "binary_crossentropy", string dtype = null, bool from_logits = false, float label_smoothing = 0)
  9. : base(Fn, name, dtype)
  10. {
  11. }
  12. internal static Tensor Fn(Tensor y_true, Tensor y_pred)
  13. {
  14. return Losses.Loss.binary_crossentropy(y_true, y_pred);
  15. }
  16. }
  17. }