| ag_slice_rows | R Documentation |
Returns rows from + 1 to from + n of x (from is
0-based), e.g. one field of a packed batch read with
ag_get_rows. On the GPU it is a view made contiguous on the
device, with nothing crossing the bus; inside ag_capture()
from and n are constants of the recording.
ag_slice_rows(x, from, n)
x |
ag_tensor (or matrix) with at least |
from |
0-based index of the first row |
n |
Number of rows |
The gradient is g in the sliced rows and zero elsewhere.
ag_tensor of shape n x ncol(x)
x <- ag_tensor(matrix(1:12, 4, 3))
as.matrix(ag_slice_rows(x, 1, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.