IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Mojo function

log_shape

def log_shape[has_mode_1: Bool, has_mode_2: Bool, name: String](mode_1: Int, mode_2: Int)

Logs the shape of a named tensor dimension pair to the info logger.

Parameters:

  • ​has_mode_1 (Bool): When True, prefixes the first dimension value with an underscore to indicate a dynamic dimension.
  • ​has_mode_2 (Bool): When True, prefixes the second dimension value with an underscore.
  • ​name (String): The label to print before the shape tuple.

Args:

  • ​mode_1 (Int): Value of the first dimension.
  • ​mode_2 (Int): Value of the second dimension.