Skip to content

Commit

Permalink
AbstractArray -> DenseArray for params!()
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangnrd committed Aug 24, 2022
1 parent a2fee8e commit 6718314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Possible values include:
"""
trainmode!(m, mode = true) = mode isa Bool ? testmode!(m, !mode) : testmode!(m, mode)

params!(p::Params, x::AbstractArray{<:Number}, seen = IdSet()) = Functors.isleaf(x) && push!(p, x)
params!(p::Params, x::DenseArray{<:Number}, seen = IdSet()) = Functors.isleaf(x) && push!(p, x)

function params!(p::Params, x, seen = IdSet())
x in seen && return
Expand Down

0 comments on commit 6718314

Please sign in to comment.