Skip to content

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

@wangsd01

Description

@wangsd01

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions