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_normal_shape

def random_normal_shape[output_rank: Int](shape: T, mean: Scalar, variance: Scalar, seed_value: T) -> IndexList[output_rank]

Computes the output shape for the mo.random.normal 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): Mean of the normal distribution; does not affect the output shape.
  • ​variance (Scalar): Variance of the normal distribution; 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?