How to Read the Graph and Node Labels in Netron
Updated
Netron renders a model as a directed graph: each node is an operator or function in the model, and each edge is a tensor flowing between them. Read the graph left-to-right (or top-to-bottom) as the order of computation, and read a node's label as the name of the operation or module that produced it. The page itself shows this vocabulary directly — its legend lists graph operations such as add, subtract, and multiply, and a function-style label like foo_bar.foo — so the labels you see in a model follow the same pattern.
What the graph represents
The graph is the model's computation structure, not its weights. It answers "what happens to the data, and in what order," not "what values are stored." That distinction matters when you are inspecting a model: the graph tells you the architecture, while tensor shapes and parameters are details you read from individual nodes.
A practical way to read it:
- Direction — follow edges from inputs toward outputs. In most visualizers this is left-to-right or top-to-bottom.
- Nodes — each one is a step: an operation, a layer, or a function call.
- Edges — each one carries a tensor from one node to the next.
Reading node labels
Node labels come in two common shapes, and the page's own legend illustrates both.
Operator labels
Short names like add, subtract, and multiply are operators. They describe the arithmetic or tensor operation applied to their inputs. When you see one, check how many edges enter the node — that tells you the arity. A node labeled add with two incoming edges is adding two tensors; the same label with more inputs is a multi-way sum.
Function and module labels
Dotted labels such as foo_bar.foo are namespaced names. The part before the dot is typically a module, class, or scope, and the part after is the function or method within it. So foo_bar.foo reads as "function foo inside module foo_bar." In real models these dotted names usually mirror the source code's module path, which makes them useful for tracing a node back to the code that defined it.
| Label pattern | What it usually means | What to check |
|---|---|---|
add, subtract, multiply |
A single operator | Number of incoming edges (arity) |
foo_bar.foo |
A function or method inside a module/scope | The module prefix to locate the source |
| Dotted chain with several segments | Nested scopes | Which segment is the module vs. the callable |
A worked example
Suppose you open a model and see a node labeled multiply with two inputs, feeding into a node labeled foo_bar.foo, which then feeds an output. Read it as: two tensors are multiplied, the product is passed into the function foo defined in module foo_bar, and that function's result is the output. If the result looks wrong, the graph narrows the search to those two steps — check the multiply's input shapes first, then the function's implementation in foo_bar.
Common points of confusion
- A label is a name, not a guarantee of behavior. A node called
addis named for addition, but custom or renamed layers can carry misleading labels. Confirm against the model's source or export. - Dotted names are paths, not values.
foo_bar.footells you where the code lives, not what it computes. - The graph omits weights. Do not expect parameter values in the graph view; use it for structure and use node details for shapes and attributes.
- Version matters. The page shows a version indicator alongside the graph, so if a label looks unfamiliar, check which version of the tool rendered it.
Once you can read direction, arity, and the two label styles, the graph becomes a map you can navigate from input to output and from a suspicious node back to its source code.