Description Usage Arguments Examples
Convert a tensor to a boolean equivalent tensor
1 | as_boolean(x)
|
x |
a torch tensor |
1 2 3 4 5 | ## Not run:
uo <- torch$ones(3L)
as_boolean(uo) # tensor([True, True, True], dtype=torch.bool)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.