Use <:Number
This commit is contained in:
parent
14e94c291e
commit
606fe58854
@ -39,8 +39,7 @@ end
|
||||
|
||||
trainable(m) = functor(m)[1]
|
||||
|
||||
params!(p::Params, x::AbstractArray{<:Real}, seen = IdSet()) = push!(p, x)
|
||||
params!(p::Params, x::AbstractArray{<:Complex{<:Real}}, seen = IdSet()) = push!(p, x)
|
||||
params!(p::Params, x::AbstractArray{<:Number}, seen = IdSet()) = push!(p, x)
|
||||
|
||||
function params!(p::Params, x, seen = IdSet())
|
||||
x in seen && return
|
||||
|
Loading…
Reference in New Issue
Block a user