slc | R Documentation |
Creates a slice object that can be used when indexing torch tensors.
slc(start, end, step = 1)
start |
(integer) starting index. |
end |
(integer) the last selected index. |
step |
(integer) the step between indexes. |
if (torch_is_installed()) {
x <- torch_randn(10)
x[slc(start = 1, end = 5, step = 2)]
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.