powered by
Convert a tensor to a boolean equivalent tensor
as_boolean(x)
a torch tensor
# NOT RUN { uo <- torch$ones(3L) as_boolean(uo) # tensor([True, True, True], dtype=torch.bool) # }
Run the code above in your browser using DataLab