This is a mostly internal function that is used in PipeOpTorchs with multiple input channels.
It creates the union of multiple ModelDescriptors:
graphs are combinded (if they are not identical to begin with). The first entry'sgraphis modified by reference.PipeOps with the same ID must be identical. No new input edges may be added toPipeOps.Drops
pointer/pointer_shapeentries.The new task is the feature union of the two incoming tasks.
The
optimizerandlossof bothModelDescriptors must be identical.Ingress tokens and callbacks are merged, where objects with the same
"id"must be identical.
Arguments
- md1
(
ModelDescriptor) The firstModelDescriptor.- md2
(
ModelDescriptor) The secondModelDescriptor.
Details
The requirement that no new input edgedes may be added to PipeOps is not theoretically necessary, but since
we assume that ModelDescriptor is being built from beginning to end (i.e. PipeOps never get new ancestors) we
can make this assumption and simplify things. Otherwise we'd need to treat "..."-inputs special.)
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_to_module(),
nn_graph()
Other Model Configuration:
ModelDescriptor(),
mlr_pipeops_torch_callbacks,
mlr_pipeops_torch_loss,
mlr_pipeops_torch_optimizer