as_boolean {rTorch} | R Documentation |
Convert tensor to boolean type
Description
Convert a tensor to a boolean equivalent tensor
Usage
as_boolean(x)
Arguments
x |
a torch tensor |
Examples
## Not run:
uo <- torch$ones(3L)
as_boolean(uo) # tensor([True, True, True], dtype=torch.bool)
## End(Not run)
[Package rTorch version 0.4.2 Index]