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 b43fbe4 commit a9642c1Copy full SHA for a9642c1
src/softmax.jl
@@ -68,7 +68,7 @@ end
68
way than directly taking the log of the softmax function, which is commonly used in
69
computing cross entropy loss.
70
"""
71
-function logsoftmax(xs::AbstractArray{T}; dims=1) where {T}
+function logsoftmax(xs::AbstractArray; dims=1)
72
max_ = maximum(xs, dims=dims)
73
out = exp.(xs .- max_)
74
log_ = log.(sum(out, dims=dims))
0 commit comments