torch_randperm | R Documentation |
Randperm
torch_randperm(
n,
dtype = torch_int64(),
layout = NULL,
device = NULL,
requires_grad = FALSE
)
n |
(int) the upper bound (exclusive) |
dtype |
( |
layout |
( |
device |
( |
requires_grad |
(bool, optional) If autograd should record operations on the returned tensor. Default: |
Returns a random permutation of integers from 0
to n - 1
.
if (torch_is_installed()) {
torch_randperm(4)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.