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

GradientTape usage in Haskell #251

Open
johndoe888 opened this issue Oct 31, 2019 · 5 comments
Open

GradientTape usage in Haskell #251

johndoe888 opened this issue Oct 31, 2019 · 5 comments

Comments

@johndoe888
Copy link

GradientTape usage for reverse mode differentiation does not seem to be supported at the moment.

Any chance that it will be supported in the near future or was it left out intentionally?

Really looking forward to it as we want to move our Python test code to Haskell.

Any comment appreciated ;)

@blackgnezdo
Copy link
Contributor

To the best of my understanding GradientTape is a feature of Eager mode (and TF2.0). We don't have anything like this in Haskell APIs. The gradients are computed automatically, but via a very different mechanism. Overall, the request seems infeasible.

@johndoe888
Copy link
Author

johndoe888 commented Nov 6, 2019

Thank you for the quick answer.

I was able to build and inspect a graph in TensorFlowHaskell, and also to compute gradients with forward-mode differentiation.

In the end I am not specifically interested in using GradientTape. I would like to use reverse-mode automatic differentiation (as seen here) to compute a gradient based on a graph (as seen here on page 11).

Is there an API to somehow achieve this, and if not, maybe you can explain in a little more detail why this is not possible?

@blackgnezdo
Copy link
Contributor

Apologies, I didn't reply sooner to this comment.

Thanks for the references. I see you seem to be interested in applying the general idea.

I presume you've found that we have Gradient.hs? That's the closest I know to what you are looking for. If you have a specific proposal (PR) of the feature you need, please share it and we'll see how well it fits with what already exists.

@blackgnezdo
Copy link
Contributor

blackgnezdo commented Nov 12, 2019

I'm reopening this issue and closing the other one which seems like a duplicate at this point.

@blackgnezdo blackgnezdo reopened this Nov 12, 2019
@fkm3
Copy link
Contributor

fkm3 commented Nov 12, 2019

Hi. Our current Gradient module actually supports reverse mode differentiation, but does not support forward mode. Did you run into any problems using it?

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

No branches or pull requests

3 participants