copy_(src, non_blocking=False) → Tensor
Copies the elements from src into self tensor and returns self.
The src tensor must be broadcastable with the self tensor. It may be of a different data type or reside on a different device.
| Parameters: |
|---|
本文详细介绍了PyTorch中张量复制(copy_)函数的使用方法,包括参数解释及注意事项。该函数允许从源张量(src)复制元素到目标张量(self),并返回目标张量。源张量可以具有不同的数据类型或位于不同的设备上。
1万+

被折叠的 条评论
为什么被折叠?



