kaira.data.create_uniform_tensor
- kaira.data.create_uniform_tensor(size: List[int] | Size | int, low: float = 0.0, high: float = 1.0, device: device | None = None, dtype: dtype | None = None) Tensor[source]
Create a tensor with uniformly distributed random values.
- Parameters:
size – Shape of the tensor to generate
low – Lower bound of the uniform distribution (inclusive)
high – Upper bound of the uniform distribution (exclusive)
device – Device to create the tensor on (default: None, uses default device)
dtype – Data type of the tensor (default: None, uses default dtype)
- Returns:
A tensor with random values uniformly distributed between low and high