Skip to content

Error when adding the model graph as a child of input_node

Encountered an error when adding the model graph as a child of input_node using input_node.add_child(aidge_model). This issue occurs only when our model architecture includes nn.Conv2d and nn.Linear layers configured with bias=False.

Unexpected behavior:

The graph visualization shows an unexpected structure when bias is disabled. Please refer to the reference diagram for more details.

💥 Error details:

[ERROR] - Assertion failed: otherView->inputNodes().size() == 1U in
[ERROR]   /home/marwa/Edge/aidge/aidge/aidge_core/src/graph/Node.cpp:309
[FATAL] - Input node of GraphView  need to be specified, because it has more
[FATAL]   than one input (20 inputs), when trying to add it as a child of node
[FATAL]   XXX (of type Producer)
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[17], line 1
----> 1 input_node.add_child(aidge_model)

RuntimeError: Input node of GraphView  need to be specified, because it has more than one input (20 inputs), when trying to add it as a child of node XXX (of type Producer)

📌 Request:

Could you please clarify whether the current graph handling supports models with bias=False in linear and convolutional layers?

Specifically:

  • Why does disabling bias lead to a graph node with multiple (20) inputs?
  • How should this be handled when adding child nodes in the graph?