Function torch ::stable::empty_like#
Defined in File ops.h
Function Documentation#
-
inline torch::stable::Tensor torch::stable::empty_like(const torch::stable::Tensor &self)#
Stable version of the empty_like op.
Creates a new uninitialized tensor with the same size, dtype, layout, and device as the input tensor. This version does not support kwargs (device, dtype, layout, memory_format) - kwargs support may be added in the future.
Minimum compatible version: PyTorch 2.9.
- Parameters:
self – The input tensor whose properties will be used for the new tensor.
- Returns:
A new uninitialized tensor with the same properties as self.