You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As noticed somewhere in FluxML/NNlib.jl#484, it appears that @grad_from_chainrule is not able to see custom types in method signatures. I looked through the issues here and hope I did not overlook it.
My guess is that method argument expressions should be escaped, here or in the parsing later on.
MWE
using ReverseDiff
struct myNumber val end# define chain rules here ...
ReverseDiff.@grad_from_chainrulessin(x::myNumber)
This gives ERROR: UndefVarError: myNumber not defined.
If we look into @macroexpand ... we see stuff like sin(var"#54#x"::ReverseDiff.myNumber) .
The text was updated successfully, but these errors were encountered:
As noticed somewhere in FluxML/NNlib.jl#484, it appears that
@grad_from_chainrule
is not able to see custom types in method signatures. I looked through the issues here and hope I did not overlook it.My guess is that method argument expressions should be escaped, here or in the parsing later on.
MWE
This gives
ERROR: UndefVarError: myNumber not defined
.If we look into
@macroexpand ...
we see stuff likesin(var"#54#x"::ReverseDiff.myNumber)
.The text was updated successfully, but these errors were encountered: