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

Add draft version of AutogradTensor #1942

Closed
wants to merge 12 commits into from

Conversation

mcleonard
Copy link
Contributor

Adding AutogradTensor for performing backpropagation. Only function that works right now is addition. An example is shown in the notebook.

@mcleonard
Copy link
Contributor Author

In the last commit I wrote some functionality to generate grad_fn classes from a file called derivatives.yaml using build_gradients.py. It's similar to this file from Pytorch: https://github.com/pytorch/pytorch/blob/master/tools/autograd/derivatives.yaml. Except that I'm generating a Python file.

This structure should make it easier to construct gradient functions for Tensor methods. I think the next step is to generate methods that can be attached to Autograd.

…able for an AutogradTensor method. Also add a few more gradient functions.
@mcleonard
Copy link
Contributor Author

Making progress. This time I set it up so that AutogradTensor automatically checks if a method has a gradient function defined in gradients.py. As we add gradients to derivatives.yaml, they'll automatically be available in the autograd system.

Something I need help with is having .grad work for Wrappers...

@iamtrask
Copy link
Member

iamtrask commented Mar 8, 2019

Thank you for leaving good comments here - makes it really easy to stay updated :)

@mcleonard
Copy link
Contributor Author

Okay! Finally added tests for ~6 gradient functions.

@iamtrask What's left to do to merge all this?

@iamtrask iamtrask marked this pull request as ready for review March 28, 2019 19:54
@iamtrask
Copy link
Member

See #2095 for continuation of this PR

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 this pull request may close these issues.

2 participants