LossFunction
LearningHorse.LossFunction.mse
— Functionmse(y, t)
Return the mean square error:mean((y .- t) .^ 2)
Example
julia> loss = mse
mse (generic function with 1 method)
julia> y, t = [1, 3, 2, 5], [1, 2, 3, 4]
([1, 3, 2, 5], [1, 2, 3, 4])
julia> loss(y, t)
0.75
LearningHorse.LossFunction.cee
— Functioncee(y, t, dims = 1)
Return the cross entropy error:mean(-sum(t.*log(y)))
Example
julia> loss = cee
cee (generic function with 1 method)
julia> y, t = [1, 3, 2, 5], [1, 2, 3, 4]
([1, 3, 2, 5], [1, 2, 3, 4])
julia> loss(y, t)
-10.714417768752456