Fix profiling for models with layers with multiple inputs
This PR attempts to fix profiling for models with layers with multiple inputs. This comes up with ResNet-type models that have Add()
layers for example.
This is part of a bigger update for TinyML, which lives here: https://github.com/jmduarte/hls4ml/tree/pynq but I cherry-picked this commit.