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

Automatic Differentiation and Gradients tf.GradientTape() #285

Open
danilojsl opened this issue Apr 11, 2021 · 2 comments
Open

Automatic Differentiation and Gradients tf.GradientTape() #285

danilojsl opened this issue Apr 11, 2021 · 2 comments

Comments

@danilojsl
Copy link

Please make sure that this is a feature request. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template

System information

  • TensorFlow version (you are using): 2.3.1
  • Are you willing to contribute it (Yes/No): Yes, when able and available

Describe the feature and the current behavior/state.
TensorFlow provides the tf.GradientTape API to differentiate automatically, TensorFlow needs to remember what operations happen in what order during the forward pass. Then, during the backward pass, TensorFlow traverses this list of operations in reverse order to compute gradients.

Details about this feature can be found in the official TensorFlow documentation for Gradient Tapes

Will this change the current api? How?
Yes, I think it will add a new feature to tensorflow-core module

Who will benefit with this feature?
Anyone that requires a very low-level control over training and evaluation of a deep learning model and everyone who is already familiar with TF/Keras.

Any Other info.
tf.GradientTape API is needed when writing a training loop from scratch as described here

@Craigacp
Copy link
Collaborator

It's worth noting that we already have support for gradients when operating in Graph mode, so you can train models in TF-Java today. What we don't currently support is gradients in eager mode, as that is mostly implemented in the python layer of core tensorflow. The tensorflow team are refactoring the gradient support and pushing more of it down into the C++ layer where we may be able to access it from Java, but that refactor is still in progress and we don't know when it will be done.

@saudet
Copy link
Contributor

saudet commented Apr 22, 2021

@danilojsl The C/C++ API has been mapped, see pull #283, please give it a try!

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