For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
random_uniform_shape
def random_uniform_shape[output_rank: Int](shape: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=shape.static_spec], mean: Scalar, variance: Scalar, seed_value: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=seed_value.static_spec]) -> IndexList[output_rank]
Computes the output shape for the mo.random.uniform graph op.
Parameters:
- βoutput_rank (
Int): Number of dimensions of the output tensor; must equal the length ofshape.
Args:
- βshape (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=shape.static_spec]): One-dimensional tensor of output dimensions, lengthoutput_rank. - βmean (
Scalar): Scalar parameter from the uniform op; does not affect the output shape. - βvariance (
Scalar): Scalar parameter from the uniform op; does not affect the output shape. - βseed_value (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=seed_value.static_spec]): One-dimensional tensor holding the random seed; does not affect the output shape.
Returns:
IndexList[output_rank]: The output shape specified by shape.