Fix graph for multiple model inputs
Purpose: Fix graph for multiple model inputs.
- Issue: Currently, the second model input assumes the first model input is also an input to it. This PR fixes that behavior.
- This bug has a practical effect in that it will result in unnecessarily clone the first model input (because it sees it is "input" to two different layers) and cause an issue synthesizing the resulting HLS.
- Incorrect graph before the fix:
- Correct graph after the fix:
- Test showing this behavior (fails on
fastmachinelearning:master
, succeeds onjmduarte:multiple_inputs_fixes
): https://gist.github.com/jmduarte/d9146904980b6574032e90621ef383fb - There's also a related issue of plotting graphs with layers with multiple outputs that I will try to fix in this PR