any
tch_any(x, dim = NULL, keepdim = FALSE, na.rm = FALSE)
x | tensor object |
---|---|
dim | if NULL (the default) will reduce to a scalar. Otherwise it will
return TRUE if all elements in each row of the tensor in the given dimension
|
keepdim | If keepdim is TRUE, the output tensor is of the same size as
input except in the dimension dim where it is of size 1. Otherwise, dim is
squeezed |
na.rm | won't be used by the function. Only there to be compatible with all generic. |
#> tensor #> 1 #> [ Variable[CPUByteType]{} ]tch_any(x, dim = 0)#> tensor #> 1 #> 1 #> [ Variable[CPUByteType]{2} ]tch_any(x, dim = 1, keepdim = FALSE)#> tensor #> 1 #> 1 #> [ Variable[CPUByteType]{2} ]