-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add support for "fast" hyperbolic functions #52
Comments
I also noticed that not supporting functions like Other packages, like Zygote and ChainRules, specify that the rules should be a part of a function library, instead of a AD library. This could be a solution to us. Another solution would be using new features in Pkg.jl like weak dependencies or conditional loading. This might be more feasible since we are so far only an experimental AD library. That being said, I still need to do some experiments to find the correct way of soving this. It's great that you raised the question and I welcome more thoughts on this! |
I don't really know, I tried to add NNlib and changed the code in codegen but it did not make it work. This tanh_fast seems to be a weird function and does not behave normally. I can try to send you a code, you might see the problem directly. Otherwise, I have never used the new features in Pkg.jl and it might be a good thing to try! |
Oh ok, you can either paste the code here in the issue, or open a new PR for that. I will try to solve this based on your current progress. |
You can add add these methods in https://github.com/YichengDWu/Sophon.jl/blob/main/ext/SophonTaylorDiffExt.jl#L16-L24 |
Good job! |
Hej,
The support of functions such as
tanh_fast
orsigmoid_fast
is missing. I tried to add it but it seems not that easy (could it be possible to overloadtanh_fast == tanh
on a symbolic?Would it be somehow possible to support all activation functions in NNlib?
The text was updated successfully, but these errors were encountered: