TRUE if two tensors have the same size and elements, FALSE otherwise.

tch_equal(x, other)

Arguments

x

tensor object

other

tensor object to compare

Examples

x <- tensor(c(1,2)) y <- tensor(c(1,2)) tch_equal(x, y)
#> [1] TRUE