Description Usage Arguments Details See Also Examples
Prints a summary of a tidytensor as a nested hierarchy of tensors of lower rank.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
x |
a tidytensor to summarize. |
show_dimnames |
show the dimension names, if present, or dimension indices if not in base-level prints. |
max_per_level |
only show this many sub-tensors per level. |
base_rank |
either NULL, 1, 2, or 3 - specifies whether the inner/bottom-most tensors should be represented as rank 1, 2, or 3 in a grid (NULL for autodetect based on tensor shape, see details). |
max_rows |
limit the base-level prints to include this many rows (also applies to 1d prints). |
max_cols |
limit the base-level prints to include this many columns. |
max_depth |
in 3d representation, limit the base-level prints to include this many entries of the last rank. |
signif_digits |
number of significant digits to print for numeric tensors. |
indent |
indent the printout by this much (used internally). |
... |
additional arguments to be passed to or from methods (ignored). |
The base_rank
argument specifies whether the lowest ranks of the tensor (displayed as a grid) should be shown as rank 2 tensors, rank 3 tensors, or rank 1 tensors; the default of NULL
will
select 3 if the last rank is of size 3 or 1 (assuming an image and a "channels-last" convention), 2 if the 3rd-to-last rank is length 3 or 1 (assuming an image
and a "channels-first" convention) or if there are only two ranks or if the last two ranks are equal (assuming an image channel of some kind), and otherwise will default to 1.
max_per_level
indicates how many replicates
1 2 3 4 5 6 7 | t <- as.tidytensor(array(1:(2 * 3 * 4 * 5), dim = c(2, 3, 4, 5)))
ranknames(t) <- c("samples", "batches", "rows", "cols")
print(t, base_rank = 2)
t <- as.tidytensor(array(1:(2 * 3 * 40 * 50 * 3), dim = c(2, 3, 40, 50, 3)))
ranknames(t) <- c("sample", "batch", "row", "pixel", "channel")
print(t, max_rows = 6, max_cols = 6, max_depth = 3, show_dimnames = TRUE, base_rank = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.