| assert_shape | R Documentation |
Checks that shape is a valid shape, i.e. an integer() with at least one dimension, NA where
a dimension is unknown. See the "Shape Inference" section of PipeOpTorch for the conventions.
assert_shape(
shape,
null_ok = FALSE,
coerce = TRUE,
unknown_batch = NULL,
len = NULL
)
shape |
( |
null_ok |
( |
coerce |
( |
unknown_batch |
( |
len |
( |
The shape, coerced to an integer() if coerce is TRUE.
Other Shape Assertions:
assert_dim_in_range(),
assert_known_dims(),
assert_ndim(),
assert_not_batch_dim(),
assert_positive_extent(),
assert_same_batch_size(),
assert_same_ndim(),
assert_shapes()
assert_shape(c(NA, 3, 32, 32))
try(assert_shape("not a shape"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.