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.

CategoricalCrossentropy.cs 559 B

12345678910111213141516
  1. namespace Tensorflow.Keras.Metrics;
  2. public class CategoricalCrossentropy : MeanMetricWrapper
  3. {
  4. public CategoricalCrossentropy(string name = "categorical_crossentropy",
  5. TF_DataType dtype = TF_DataType.TF_FLOAT,
  6. bool from_logits = false,
  7. float label_smoothing = 0f,
  8. Axis? axis = null)
  9. : base((yt, yp) => keras.metrics.categorical_crossentropy(
  10. yt, yp, from_logits: from_logits, label_smoothing: label_smoothing, axis: axis ?? -1),
  11. name: name,
  12. dtype: dtype)
  13. {
  14. }
  15. }