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 44a3055 commit 54e0457Copy full SHA for 54e0457
src/regularized/soft_argmax.jl
@@ -16,5 +16,5 @@ function soft_argmax(z::AbstractVector)
16
end
17
18
function soft_argmax_regularization(y::AbstractVector)
19
- return isprobadist(y) ? negative_shannon_entropy(y) : typemax(R)
+ return isprobadist(y) ? negative_shannon_entropy(y) : typemax(eltype(y))
20
src/regularized/sparse_argmax.jl
@@ -16,7 +16,7 @@ function sparse_argmax(z::AbstractVector; kwargs...)
function sparse_argmax_regularization(y::AbstractVector)
- return isprobadist(y) ? half_square_norm(y) : typemax(R)
+ return isprobadist(y) ? half_square_norm(y) : typemax(eltype(y))
21
22
"""
0 commit comments