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

How to detach variable from gradient computation in tachi-scope #39

Open
wangsd01 opened this issue Jan 15, 2021 · 0 comments
Open

How to detach variable from gradient computation in tachi-scope #39

wangsd01 opened this issue Jan 15, 2021 · 0 comments

Comments

@wangsd01
Copy link

I was thinking to detach a variable from gradient computation in ti.kernel.

E.g y = copy(x).detach()
f(x) = 5x + 6y
I hope df/dx = 5, not 11.

How can I do the above process in py-taichi? Thank you!

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

1 participant