model_descriptor_to_module {mlr3torch}R Documentation

Create a nn_graph from ModelDescriptor

Description

Creates the nn_graph from a ModelDescriptor. Mostly for internal use, since the ModelDescriptor is in most circumstances harder to use than just creating nn_graph directly.

Usage

model_descriptor_to_module(
  model_descriptor,
  output_pointers = NULL,
  list_output = FALSE
)

Arguments

model_descriptor

(ModelDescriptor)
Model Descriptor. pointer is ignored, instead output_pointer values are used. ⁠$graph⁠ member is modified by-reference.

output_pointers

(list of character)
Collection of pointers that indicate what part of the model_descriptor$graph is being used for output. Entries have the format of ModelDescriptor$pointer.

list_output

(logical(1))
Whether output should be a list of tensors. If FALSE, then length(output_pointers) must be 1.

Value

nn_graph

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, mlr_pipeops_torch_ingress_num, model_descriptor_to_learner(), model_descriptor_union(), nn_graph()


[Package mlr3torch version 0.1.0 Index]