Show / Hide Table of Contents

Class Losses

A loss function (or objective function, or optimization score function) is one of the two parameters required to compile a model

Inheritance
System.Object
Keras
Base
Losses
Implements
System.IDisposable
Inherited Members
Base.Parameters
Base.None
Base.Init()
Base.ToPython()
Base.InvokeStaticMethod(Object, String, Dictionary<String, Object>)
Base.InvokeMethod(String, Dictionary<String, Object>)
Base.Item[String]
Keras.Instance
Keras.keras
Keras.keras2onnx
Keras.tfjs
Keras.Dispose()
Keras.ToTuple(Array)
Keras.ToList(Array)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Keras
Assembly: Keras.dll
Syntax
public class Losses : Base, IDisposable

Methods

| Improve this Doc View Source

BinaryCrossentropy(NDarray, NDarray)

Binaries the crossentropy.

Declaration
public static NDarray BinaryCrossentropy(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray
| Improve this Doc View Source

CategoricalCrossentropy(NDarray, NDarray)

Categoricals the crossentropy.

Declaration
public static NDarray CategoricalCrossentropy(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray
| Improve this Doc View Source

CategoricalHinge(NDarray, NDarray)

Calculates the categorial hinge.

Declaration
public static NDarray CategoricalHinge(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray
| Improve this Doc View Source

CosineProximity(NDarray, NDarray)

Cosines the proximity.

Declaration
public static NDarray CosineProximity(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray
| Improve this Doc View Source

Hinge(NDarray, NDarray)

Calculates the Hinge error.

Declaration
public static NDarray Hinge(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray
| Improve this Doc View Source

KullbackLeiblerDivergence(NDarray, NDarray)

Kullbacks the leibler divergence.

Declaration
public static NDarray KullbackLeiblerDivergence(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray
| Improve this Doc View Source

LogCosh(NDarray, NDarray)

Logarithm of the hyperbolic cosine of the prediction error. log(cosh(x)) is approximately equal to(x** 2) / 2 for small x and to abs(x) - log(2) for large x.This means that 'logcosh' works mostly like the mean squared error, but will not be so strongly affected by the occasional wildly incorrect prediction.

Declaration
public static NDarray LogCosh(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray
| Improve this Doc View Source

MeanAbsoluteError(NDarray, NDarray)

Calculates the mean absolute error.

Declaration
public static NDarray MeanAbsoluteError(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray
| Improve this Doc View Source

MeanAbsolutePercentageError(NDarray, NDarray)

Calculates the mean absolute percentage error.

Declaration
public static NDarray MeanAbsolutePercentageError(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray
| Improve this Doc View Source

MeanSquaredError(NDarray, NDarray)

Calculates the mean squared error.

Declaration
public static NDarray MeanSquaredError(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray
| Improve this Doc View Source

MeanSquaredLogarithmicError(NDarray, NDarray)

Calculates the mean squared log error.

Declaration
public static NDarray MeanSquaredLogarithmicError(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray
| Improve this Doc View Source

Poisson(NDarray, NDarray)

Poissons the specified y true.

Declaration
public static NDarray Poisson(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray
| Improve this Doc View Source

SparseCategoricalCrossentropy(NDarray, NDarray)

Sparses the categorical crossentropy.

Declaration
public static NDarray SparseCategoricalCrossentropy(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray
| Improve this Doc View Source

SquaredHinge(NDarray, NDarray)

Calculates the Square Hinge

Declaration
public static NDarray SquaredHinge(NDarray y_true, NDarray y_pred)
Parameters
Type Name Description
Numpy.NDarray y_true

tensor of true targets.

Numpy.NDarray y_pred

tensor of predicted targets.

Returns
Type Description
Numpy.NDarray

Implements

System.IDisposable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX