Skip to contents

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