copy_to
- Tensor.copy_to(tensor)
Copies the tensor data of the current
Tensorobject to anotherTensorobject.Notes
Before calling this method, make sure the format, shape, and data type of source and target tensors are identical and valid.
This function automatically handles data alignment when required.
Note
Data may be modified during copying from the source to target due to differences in device type, contiguity requirements, and other data characteristics.