We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69b2a8d commit 59876a1Copy full SHA for 59876a1
src/losses/margin.jl
@@ -131,8 +131,7 @@ L(a) = \ln (1 + e^{-a})
131
struct LogitMarginLoss <: MarginLoss end
132
(loss::LogitMarginLoss)(agreement::Number) = log1p(exp(-agreement))
133
deriv(loss::LogitMarginLoss, agreement::Number) = -one(agreement) / (one(agreement) + exp(agreement))
134
-deriv2(loss::LogitMarginLoss, agreement::Number) = (eᵗ = exp(agreement);
135
-eᵗ / abs2(one(eᵗ) + eᵗ))
+deriv2(loss::LogitMarginLoss, agreement::Number) = (eᵗ=exp(agreement); eᵗ / abs2(one(eᵗ) + eᵗ))
136
137
isunivfishercons(::LogitMarginLoss) = true
138
isdifferentiable(::LogitMarginLoss) = true
0 commit comments