Remove unused input port in Input layer. #318
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Number: #298
Objective of pull request: Remove unused input port.
Pull request checklist
Your PR fulfills the following requirements:
flakeheaven lint src/lava tests/
) and (bandit -r src/lava/.
) pass locallypytest
) passes locally - I was unable to run a few tests due to a missing file (mnist.net) and being unable to open two others (/gts/ntidigits/input.npy, /gts/ntidigits/ntidigits.net). Not sure if this is a configuration issue on my end, but these failed before I made any modifications. Going to rely on the CI to check these, since that environment seems to work with these files, sorry.Pull request type
What is the current behavior?
In the latest release, the in port of the Input AbstractBlock for netx does not connect it's in port to it's neuron in port.
Load any model via netx with an input layer and connect it to data.
Then try to run this network, you will get an infinite hang.
What is the new behavior?
Input port is no longer available in Input layer, forcing usage of it's neuron's input port.
Does this introduce a breaking change?
Supplemental information
I will admit this change is a bit of a hack, but a better fix may be outside of my time commitment, and knowledge of the compiler. A better fix would probably be to set its input port to its neurons in_a port, but this causes issues with compilation that I was unable to sort out. Specifically: