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: T, mean: Scalar, variance: Scalar, seed_value: T) -> 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:

  • ​shape (T): One-dimensional tensor of output dimensions, length output_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 (T): One-dimensional tensor holding the random seed; does not affect the output shape.

Returns:

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

Was this page helpful?