torch.Tensor.copy_
- Tensor.copy_(src, non_blocking=False) → Tensor
Copies the elements from
srcintoselftensor and returns.
Copies the elements from src into self tensor and returns
.
The src tensor must be broadcastable
with the self tensor. It may be of a different data type or reside on a
different device.