IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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 of shape.

Args:

Returns:

IndexList[output_rank]: The output shape specified by shape.