neuromorphs / NIRTorch

PyTorch helper module to translate to and from NIR
https://neuroir.org/docs
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

Added shapes to graph edges #7

Closed Jegp closed 1 year ago

Jegp commented 1 year ago

Currently, nirtorch fails to provide shapes for output nodes in certain situations.

My method for addressing this for now has been to add shape information to edges in the nirtorch Graph object. This hasn't been fully tested, but I wanted to get your opinion on this before proceeding.

It's worth mentioning the extra edge case when our graph only has one node and no edges; In that case, I've been forced to add an extra member to the Graph object called module_output_shape that keep track of the output shape of the modules. It's not pretty, and I'm open to other suggestions!