Topological sort that returns an edge compatible ordering of the vertices. Translated from pseudo-code and implements Tarjan's algorithm. The topological sort will contain NEGATIVE values, if there is a CYCLE.
Topological sort that returns an edge compatible ordering of the vertices. Translated from pseudo-code and implements Tarjan's algorithm. The topological sort will contain NEGATIVE values, if there is a CYCLE.
Topological sort for Autograd DAGs (Function nodes). Traverses the computation graph starting from a root Variabl (typically the final loss/output) and returns a topologically sorted sequence of Function nodes (inputs appear before the Functions that consume them).
Topological sort for Autograd DAGs (Function nodes). Traverses the computation graph starting from a root Variabl (typically the final loss/output) and returns a topologically sorted sequence of Function nodes (inputs appear before the Functions that consume them).