View source: R/learner_torch_methods.R
| encode_prediction | R Documentation |
Converts the raw output of a network into a list() that can be passed to
mlr3::as_prediction_data(), which is what the private .encode_prediction() method of a
LearnerTorch has to return.
This is the default implementation that is used by LearnerTorch and
LearnerTorchModel, i.e. by all learners that don't overwrite
.encode_prediction().
When adding support for a custom task type, implement a method for the corresponding
Task class, which makes the generic torch learners work for that task type.
For the network output that is expected for the built-in task types, see section
Network Head and Target Encoding of LearnerTorch.
encode_prediction(task, network_output, predict_type, ...)
task |
( |
network_output |
( |
predict_type |
( |
... |
(any) |
named list()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.