lava-nc / lava

A Software Framework for Neuromorphic Computing
https://lava-nc.org
Other
529 stars 136 forks source link

Loihi 2 - Large input shape on simple lif/conv model makes network run forever with no error messages #826

Open j-blake-s opened 5 months ago

j-blake-s commented 5 months ago

Describe the bug When my network is run with too large of an input shape, nothing happens and the program doesn't return any information or errors, it just keeps running. Smaller input shapes work fine, its just after a random size that it stops working.

No such problem occurs when using the CPU back-end so I assume its a Loihi dependent issue.

To reproduce current behavior Here is the file which causes the problem lif_conv_model.txt

But here is a snippet for context

# Seems to stop working at some random input size
# Current working limit is (57, 57, 2)
# At another point in time, up to (98, 98, 2) was working
shape = (58, 58, 2)

# If just lif_in layer, then code works fine regardless of input size
lif_in = LIF(shape=shape, vth=50, du=0, dv=0,
          bias_mant=25)

# Addition of conv/lif_out layer seems to be the problem
conv = Conv(
        weight=np.random.randint(256, size=(4, 3, 3, 2))-128,
        input_shape=shape,
        padding=(0,0),
        stride=(2,2),
      )

lif_out = LIF(shape=conv.output_shape)

lif_in.s_out.connect(conv.s_in)
conv.a_out.connect(lif_out.a_in)
  1. I get this error ...
    Program runs forever with no error

Expected behavior When run, the network should be compiled/partitioned and then run for the specified number of steps.

Screenshots Expected Output image

Current Output image

Environment (please complete the following information):

Additional context This is the first issue I have opened on this repository so I apologize if anything is incorrect. Please let me know if I need to add or change anything.