Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next input block does not connect input port to neuron input. #298

Open
rileywhite-noblis opened this issue Apr 3, 2024 · 2 comments
Open
Assignees
Labels
1-bug Something isn't working

Comments

@rileywhite-noblis
Copy link

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.

net = netx.hdf5.Network(trained_folder + '/network.net')
data.out.connect(net.inp)
sink.connect(net.out)

Then try to run this network, you will get an infinite hang.

Expected behavior
I would expect that connecting to the in port of an input block would also establish a connection to the neuron, and let me run the model without hanging.

Environment (please complete the following information):

  • Device: Server rack
  • OS: Linux
  • Lava version 0.5.0

Additional context
It almost seems intentionally left this way, based on examples of running netx models where the data is connected directly to the input's neuron's input port (ignoring the block input port). If this is the case, then I think this input port should be removed to avoid confusion (and maybe an explanation as to why this is necessary).
The fix is a one line change, just adding self.inp.connect(self.neuron.a_in) to the init function of the Input block process class.

@rileywhite-noblis rileywhite-noblis added the 1-bug Something isn't working label Apr 3, 2024
@PhilippPlank
Copy link
Contributor

Thanks for reporting this issue. @bamsumit Can you take a look when you find some time?

@bamsumit
Copy link
Contributor

@rileywhite-noblis The input block typically consists of neuron only. The fix you suggested works in python but will not work on Loihi because a neuron can only get its input from hardware. That's why its intentionally left dangling.

I am onboard with the idea of deleting it altogether. @rileywhite-noblis would you like to contribute that change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants