Lesson 35 of 48
Graphs, DAGs, tensors
The structures a modern model is actually made of.
A computation graph is a DAG, and the “acyclic” part is what makes evaluation — and later, differentiation — possible in one pass. Add one back-edge and the whole thing becomes unanswerable.
Do this
Represent an arithmetic expression as a directed acyclic graph, topologically sort it, and evaluate it by walking that order. Then add an edge that creates a cycle and see what breaks.
The question that unlocks the next lesson
Why must a computation graph be acyclic?
- ACycles make the graph larger
- BA cycle means a value depends on itself, so no evaluation order exists
- CAcyclic graphs use less memory
- DCycles are fine — frameworks handle them