Skip to main content

Cost Functions

Cost functions Source

Currently implemented 3 Cost Functions

func BinaryCrossEntropy32

func BinaryCrossEntropy32(yPred, yTrue *G.Node) *G.Node

BinaryCrossEntropy32 calculates the binary cross entropy cost loss formula: -y_true * log(y_pred) - (1 - y_true) * log(1 - y_pred)

func MSE32

func MSE32(yPred, yTrue *G.Node) *G.Node

MSE32 calculates the Mean Squared Error cost

func RMS32

func RMS32(yPred, yTrue *G.Node) *G.Node

RMS32 calculates the Root Mean Squared error cost