The GraphLearner that as_learner_torch() returns.
On top of a GraphLearner it has the $network, $loss, $optimizer and $callbacks fields
and the $dataset() method of a LearnerTorch.
It is not in the mlr_learners dictionary, because it cannot be
constructed without a graph.
Super classes
mlr3::Learner -> mlr3pipelines::GraphLearner -> GraphLearnerTorch
Active bindings
network(
nn_module)
The network of the trained learner, i.e.$base_learner()$network.loss(
TorchLoss)
The torch loss, i.e. the one of the graph'sPipeOpTorchLoss. Read-only, the graph configures it.optimizer(
TorchOptimizer)
The torch optimizer, i.e. the one of the graph'sPipeOpTorchOptimizer. Read-only, the graph configures it.callbacks(
list()ofTorchCallbacks)
The callbacks, i.e. those of the graph'sPipeOpTorchCallbacks. Read-only, the graph configures them.
Methods
Inherited methods
mlr3::Learner$configure()mlr3::Learner$encapsulate()mlr3::Learner$format()mlr3::Learner$help()mlr3::Learner$predict()mlr3::Learner$predict_newdata()mlr3::Learner$reset()mlr3::Learner$train()mlr3pipelines::GraphLearner$base_learner()mlr3pipelines::GraphLearner$ids()mlr3pipelines::GraphLearner$importance()mlr3pipelines::GraphLearner$initialize()mlr3pipelines::GraphLearner$loglik()mlr3pipelines::GraphLearner$marshal()mlr3pipelines::GraphLearner$oob_error()mlr3pipelines::GraphLearner$plot()mlr3pipelines::GraphLearner$predict_newdata_fast()mlr3pipelines::GraphLearner$print()mlr3pipelines::GraphLearner$selected_features()mlr3pipelines::GraphLearner$unmarshal()
GraphLearnerTorch$dataset()
Create the dataset for a task, i.e. the tensors that are fed to the network.
Usage
GraphLearnerTorch$dataset(
task,
stage = if (is.null(self$model)) "train" else "predict"
)Arguments
taskTask
The task.stage(
character(1))
Whether to create the dataset the way$train()does ("train") or the way$predict()does ("predict"). Defaults to"predict"for a trained learner and to"train"otherwise, because the prediction phase reuses the state that the operators before the ingress fitted during training.