-
Notifications
You must be signed in to change notification settings - Fork 26
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
grad of convert
?
#7
Comments
finally I got it work:
Wondering is there better solutions. |
@ylxdzsw Your solution works, here are some suggestions for improvement:
|
I experimented with defining a general |
Thanks, that solution looks nice. |
I need to convert type of some variables, but it crashes AutoGrad.
The code I use is:
I tried
@primitive
like@primitive convert(T,x),dy zerograd() dy
or something similar but never get it work. Is there any way to define it properly, or how to hack AutoGrad so that at leastconvert
works without breaking other functionalities?The text was updated successfully, but these errors were encountered: