Computes element-wise equality The second argument can be a number or a tensor whose shape is broadcastable with the first argument.

# S3 method for tensor
==(x, other)

Arguments

x

tensor object

other

the tensor or value to compare

Examples

x <- tensor(1:10) y <- tensor(c(1:5, 10:6)) x == y
#> tensor #> 1 #> 1 #> 1 #> 1 #> 1 #> 0 #> 0 #> 1 #> 0 #> 0 #> [ Variable[CPUByteType]{10} ]