
clone() → Tensor
- 反向传播时,将会返回到原来的变量上
Returns a copy of theselftensor. The copy has the same size and data type asself. - NOTE
- Unlike copy_(), this function is recorded in the computation graph. Gradients propagating to the cloned tensor will propagate to the original tensor.
copy_(src, non_blocking=False) → Tensor
-
只是值得复制
Copies the elements fromsrcintoselftensor and returnsself. -
The
srctensor must be broadcastable with theselftensor. It may be of a different data type or reside on a different device.




近期评论