lazy_tensor {mlr3torch} | R Documentation |
Create a lazy tensor
Description
Create a lazy tensor.
Usage
lazy_tensor(data_descriptor = NULL, ids = NULL)
Arguments
data_descriptor |
( |
ids |
( |
Examples
ds = dataset("example",
initialize = function() self$iris = iris[, -5],
.getitem = function(i) list(x = torch_tensor(as.numeric(self$iris[i, ]))),
.length = function() nrow(self$iris)
)()
dd = as_data_descriptor(ds, list(x = c(NA, 4L)))
lt = as_lazy_tensor(dd)
[Package mlr3torch version 0.1.0 Index]