Function torch ::stable::clone#
Defined in File ops.h
Function Documentation#
-
inline torch::stable::Tensor torch::stable::clone(const torch::stable::Tensor &self)#
Stable version of the clone op.
Returns a copy of the input tensor. The returned tensor has the same data and type as the input, but is stored in a new memory location.
Minimum compatible version: PyTorch 2.9.
Note
Optional memory_format kwarg support
- Parameters:
self – The input tensor to clone.
- Returns:
A new tensor with copied data.