Fix issues with forwardDims()
To be merged after !90 (merged).
Fixes two issues with forwardDims():
- The previous iterative algorithm may be stuck in specific cases (see example below);
- It should always recompute all nodes output dims, because the graph may have changed.
Example of stuck case:
- Initial graph is output dims forwarded;
- Scaling operators are inserted before some Conv;
- The graph is output dims re-forwarded. Here is what might happen:
- Start the forward dims list with Producers;
- Move to next child nodes: the Conv;
- Conv cannot be forward dim because their new input, a Scaling node, is not forward dim;
- Check if Conv childs are forward dim: if they are not directly the new Scaling node, they are!
- We get stuck in a state where
listNodes == nextList
, although all nodes output dim are computable!
Edited by Olivier BICHLER