-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Error calculating gradient for basic function #731
Comments
Duplicate of #599, I think. However, splatting an array is usually a terrible idea anyway, this operation is
|
Could you elaborate a bit on this point? Do you mean that it's generally a terrible idea in idiomatic Julia code or that it's a terrible idea specifically in the context of functions being ADed with Zygote? And in either case why is it a bad idea? What's the difference relative to vcat? |
It's a terrible idea because the cost of splatting grows linearly with array size, so while it's ok for splatting smallish tuples into the function arguments, for large arrays cost becomes really noticeable. |
@AzamatB Ah, thanks for the explanation! I'll switch to |
Why doesn't this gradient work?
I get an error:
The text was updated successfully, but these errors were encountered: