This is a mostly internal function that is used in PipeOpTorch
s with multiple input channels.
It creates the union of multiple ModelDescriptor
s:
graph
s are combinded (if they are not identical to begin with). The first entry'sgraph
is modified by reference.PipeOp
s with the same ID must be identical. No new input edges may be added toPipeOp
s.Drops
pointer
/pointer_shape
entries.The new task is the feature union of the two incoming tasks.
The
optimizer
andloss
of bothModelDescriptor
s 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 PipeOp
s is not theoretically necessary, but since
we assume that ModelDescriptor is being built from beginning to end (i.e. PipeOp
s 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