Zygote.jl
Zygote.jl copied to clipboard
Error in handling splatted arguments
The following MWE throws an Error for me. This code will usually be a mistake in practice (this is how it showed up for us), but is valid.
function f(p; kwargs...)
g(p, kwargs...)
end
function g(p, a...)
p
end
f(5.) # works
gradient(f, 5.) # Error
The error is:
ERROR: MethodError: no method matching (::Zygote.var"#pairs_namedtuple#282"{(),NamedTuple{(),Tuple{}}})(::Tuple{})
xref #599, although not sure it's identical.