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.
2 parents d8aba5f + 2a887ee commit acd86a9Copy full SHA for acd86a9
src/adjoint.jl
@@ -21,6 +21,7 @@ for n = 0:3
21
gradtuple = Symbol(:gradtuple, n)
22
@eval begin
23
$gradtuple(x::Tuple) = ($(ntuple(_->:nothing,n)...), x...)
24
+ $gradtuple(::Tuple{Vararg{Nothing}}) = nothing
25
$gradtuple(x::Nothing) = nothing
26
$gradtuple(x) = error("Gradient $x should be a tuple")
27
end
0 commit comments