Function torch::stable::fill_#
Defined in File ops.h
Function Documentation#
-
inline torch::stable::Tensor torch::stable::fill_(const torch::stable::Tensor &self, double value)#
Stable version of the fill_.Scalar op.
Fills the input tensor with the specified scalar value in-place and returns it. This has identical semantics to the existing fill_.Scalar op.
Minimum compatible version: PyTorch 2.9.
Note
The value parameter is typed as double This is because Scalar.h is currently not header-only.
- Parameters:
self – The tensor to fill.
value – The scalar value to fill the tensor with.
- Returns:
The input tensor, now filled with the specified value.