Skip to content

Commit 7465575

Browse files
Update src/layers/basic.jl
Co-authored-by: Brian Chen <ToucheSir@users.noreply.github.com>
1 parent 1f68819 commit 7465575

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/layers/basic.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Diagonal(sz::Integer...; σ = identity, bias = true, init = ones32) = Diagonal(i
200200

201201
function (a::Diagonal)(x::AbstractArray)
202202
σ = NNlib.fast_act(a.σ, x) # replaces tanh => tanh_fast, etc
203-
return σ == typeof(identity) ? a.scale .* x .+ a.bias : σ.(a.scale .* x .+ a.bias)
203+
return σ === typeof(identity) ? a.scale .* x .+ a.bias : σ.(a.scale .* x .+ a.bias)
204204
end
205205

206206
function Base.show(io::IO, l::Diagonal)

0 commit comments

Comments
 (0)