This generic is similar to torch$gt(a, b)
# S3 method for torch.Tensor
>(a, b)
tensor
tensor
A tensor of booleans representing the logical result of the comparison.
False to represent 0, and True to represent 1 in a tensor of data type torch$uint8
.
# NOT RUN {
A <- torch$ones(5L, 5L)
C <- torch$as_tensor(np$random$randint(2L, size=c(5L, 5L)), dtype=torch$float32)
A > C
C > A
# }
Run the code above in your browser using DataLab