clone and detach #2629
-
Hi, In pytorch, There are no detailed info on |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The tensor is not copied. |
Beta Was this translation helpful? Give feedback.
tensor.detach
is used to detach the tensor from the current autodiff graph and creates a new leaf tensor.The tensor is not copied.