| GraphLearnerTorch | R Documentation |
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.
If the graph contains a PipeOpTorchModel, the loss, optimizer and
callbacks are those of its configuring operators, otherwise those of its base LearnerTorch.
It is not in the mlr_learners dictionary, because it cannot be
constructed without a graph.
mlr3::Learner -> mlr3pipelines::GraphLearner -> GraphLearnerTorch
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's PipeOpTorchLoss
or of its base LearnerTorch.
Read-only, the graph configures it.
optimizer(TorchOptimizer)
The torch optimizer, i.e. the one of the graph's
PipeOpTorchOptimizer or of its base LearnerTorch.
Read-only, the graph configures it.
callbacks(list() of TorchCallbacks)
The callbacks, i.e. those of the graph's
PipeOpTorchCallbacks or of its base LearnerTorch.
Read-only, the graph configures them.
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.
GraphLearnerTorch$dataset( task, stage = if (is.null(self$model)) "train" else "predict" )
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.
dataset
GraphLearnerTorch$clone()The objects of this class are cloneable with this method.
GraphLearnerTorch$clone(deep = FALSE)
deepWhether to make a deep clone.
Other Learner:
as_learner_torch(),
mlr_learners.ft_transformer,
mlr_learners.mlp,
mlr_learners.module,
mlr_learners.realmlp,
mlr_learners.tab_resnet,
mlr_learners.tabm,
mlr_learners.torch_featureless,
mlr_learners_torch,
mlr_learners_torch_image,
mlr_learners_torch_model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.