| assert_positive_extent | R Documentation |
Rejects a computed output size that no tensor can have, i.e. one that is not a positive number.
Operators such as convolutions and pooling compute their spatial output sizes from kernel_size,
stride, padding and dilation, a combination of which can produce a size of zero or less.
Unknown (NA) sizes are accepted, since nothing can be said about them.
assert_positive_extent(extent, shape_in, id)
extent |
( |
shape_in |
( |
id |
( |
The extent, invisibly.
Other Shape Assertions:
assert_dim_in_range(),
assert_known_dims(),
assert_ndim(),
assert_not_batch_dim(),
assert_same_batch_size(),
assert_same_ndim(),
assert_shape(),
assert_shapes()
assert_positive_extent(c(30, NA), c(NA, 3, 32, 32), id = "nn_conv2d")
try(assert_positive_extent(c(0, 4), c(NA, 3, 32, 32), id = "nn_conv2d"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.