Torch Entry Point for Numeric Features
Source:R/PipeOpTorchIngress.R
mlr_pipeops_torch_ingress_num.RdInternals
Uses batchgetter_num().
Input and Output Channels
One input channel called "input" and one output channel called "output".
For an explanation see PipeOpTorch.
See also
Other Graph Network:
ModelDescriptor(),
TorchIngressToken(),
mlr_learners_torch_model,
mlr_pipeops_module,
mlr_pipeops_torch,
mlr_pipeops_torch_ingress,
mlr_pipeops_torch_ingress_categ,
mlr_pipeops_torch_ingress_ltnsr,
model_descriptor_to_learner(),
model_descriptor_to_module(),
model_descriptor_union(),
nn_graph()
Super classes
mlr3pipelines::PipeOp -> PipeOpTorchIngress -> PipeOpTorchIngressNumeric
Methods
PipeOpTorchIngressNumeric$new()
Creates a new instance of this R6 class.
Usage
PipeOpTorchIngressNumeric$new(id = "torch_ingress_num", param_vals = list())Arguments
id(
character(1))
Identifier of the resulting object.param_vals(
list())
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction.
Examples
graph = po("select", selector = selector_type(c("numeric", "integer"))) %>>%
po("torch_ingress_num")
task = tsk("german_credit")
# The output is a model descriptor
md = graph$train(task)[[1L]]
ingress = md$ingress[[1L]]
ingress$batchgetter(task$data(1:5, ingress$features(task)), "cpu")
#> torch_tensor
#> 67 1169 6
#> 22 5951 48
#> 49 2096 12
#> 45 7882 42
#> 53 4870 24
#> [ CPUFloatType{5,3} ]