Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjoint overload for ::Function is type piracy #133

Closed
tkoolen opened this issue Jul 15, 2019 · 0 comments · Fixed by #136
Closed

Adjoint overload for ::Function is type piracy #133

tkoolen opened this issue Jul 15, 2019 · 0 comments · Fixed by #136

Comments

@tkoolen
Copy link

tkoolen commented Jul 15, 2019

if isdefined(Base, :adjoint)
Base.adjoint(f::Function) = derivative(f)
else
Base.ctranspose(f::Function) = derivative(f)
end

Is type piracy. Zygote is now similarly committing type piracy (FluxML/Zygote.jl#260), leading to warnings like

WARNING: Method definition adjoint(Function) in module Zygote at /home/twan/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:50 overwritten in module Calculus at /home/twan/.julia/packages/Calculus/2qBLt/src/derivative.jl:33.
@tkoolen tkoolen changed the title Adjoint overload for ::function is type piracy Adjoint overload for ::Function is type piracy Jul 15, 2019
This was referenced Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant