| assert_not_batch_dim | R Documentation |
Rejects an operation on the first dimension, which is the batch dimension. An operator that changes it would silently change the number of observations, which fails much later with a mismatch against the target.
assert_not_batch_dim(dim, shape, id)
dim |
( |
shape |
( |
id |
( |
The dimension, invisibly.
Other Shape Assertions:
assert_dim_in_range(),
assert_known_dims(),
assert_ndim(),
assert_positive_extent(),
assert_same_batch_size(),
assert_same_ndim(),
assert_shape(),
assert_shapes()
assert_not_batch_dim(2L, c(NA, 3, 8), id = "nn_squeeze")
try(assert_not_batch_dim(1L, c(NA, 3, 8), id = "nn_squeeze"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.