difftaichi icon indicating copy to clipboard operation
difftaichi copied to clipboard

How to detach variable from gradient computation in tachi-scope

Open wangsd01 opened this issue 5 years ago • 0 comments

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!

wangsd01 avatar Jan 15 '21 20:01 wangsd01