Skip to content

clone and detach #2629

Answered by laggui
wangjiawen2013 asked this question in Q&A
Discussion options

You must be logged in to vote

tensor.detach is used to detach the tensor from the current autodiff graph and creates a new leaf tensor.

The tensor is not copied.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by laggui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2628 on December 19, 2024 13:29.