Question about synapse usage for conv layers on nengo-loihi?

Is there a way to in advance determine the total synapse usage for a given layer and block shape? I want to assign block shapes intelligently and avoid “Total synapse bits … exceeded max …” errors. Is there a resource that can help me understand how this works?

With dense layers everything makes perfect sense. For example lets say I have a simple network structure I want to port onto loihi:

input = Input(36, 36, 3)
output = Dense(4, use_bias = False, activation = "relu")(input)
model = Model(input, output)

I know that this model will use 36 * 36 * 3 = 3888 axons and will use 3888 * 4 = 15552 synapses and if each synapse uses 16 bits that would be 248832 synaptic bits which indicates this layer will fit on loihi.

But for convolutional networks when I choose a given block shape I do not know how to predict whether or not it will violate a loihi synaptic bit limit constraint. Is there any resource which explains how this works?

Take a look at this section about Measuring utilization of chip resources. The utilization_summary function that it references reports things as a percentage of resources used for each core (we currently always map one Block to one Loihi core), but if you’d prefer to see things as raw numbers, it should be easy enough to modify that function to print those instead.

You may also want to look at some of the other sections on that Tips and Tricks page, since many of them relate to fitting larger networks on the chip. For example, if you’ve got a large convolutional layer, splitting the ensemble across multiple blocks in different ways can often help with getting it to fit.