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

Problems with custom gradient #32

Open
artem-s-shevchenko opened this issue Oct 17, 2018 · 1 comment
Open

Problems with custom gradient #32

artem-s-shevchenko opened this issue Oct 17, 2018 · 1 comment

Comments

@artem-s-shevchenko
Copy link

artem-s-shevchenko commented Oct 17, 2018

We have meet a problem when use checkpoints and custom gradients together. We have created custom gradient for operation tf.matrix_solve_ls for mode (fast=False), but if we include tensor MatrixSolveLs in the list of checkpointed tensors, the gradients function in memory_saving_gradient.py tries to use the default gradient and ends up with an error because the gradient is not defined for mode (fast=False). We are using tf 1.9. @yaroslavvb do you have any hints about how to make @tf.custom_gradient work with checkpointing?

@yaroslavvb
Copy link
Collaborator

So the monkey-patching logic calls tf.gradients right now. Are you saying that does not respect custom gradients?

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

2 participants