Open MarcoBramini opened 1 year ago
@MarcoBramini thanks for pointing out this.
First of all, tags do not necessarily need to be equal to the number of neurons. That's because they are used only if there is a connection. In short, You can see that the last two columns of spec['weights_rec']
are fully zero. In that case, no CAM will be allocated for the last two neurons.
Let's put a breakpoint in config_from_specification
line 186 sram = allocator.SRAM_content(
. There you can access to allocator
object.
You can see that
allocator.n_in = 12
allocator.n_neuron = 66
that's the same as the spec
dictionary.
There if you call allocator.tag_selector()
, it will return the tags allocated for input connections, recurrent connections, and output connections.
For input connections you'll see that [0..11]
are allocated, and for recurrent connections [12..77]
are allocated.
But the issue is that the last two tags 76
and 77
are not being used by any connection.
In allocator line 201 content_rec = self.matrix_to_synapse(
you can see that self.weights_rec
is being used as a reference matrix to create the CAM content. Since the last two rows of self.weights_rec
consist of only 0s, no CAM will be allocated!
You can also see that in spec['weights_rec']
The last two columns of it are fully zero.
The reason of that is the autoencoder_quantization(**spec)
step. There the output weights could not survive and they are unfortunately pruned.
You can force quantized 'weights_rec' to have some connections just like this
...
spec.update(autoencoder_quantization(**spec))
spec['weights_rec'][0][-1][0] = 1
spec['weights_rec'][0][-2][0] = 1
config = config_from_specification(**spec)
...
In that case, you'll see that 77 tags will be used.
@ugurcancakal in Marco's original case, how can he identify the hardware neuron IDs of the output neurons? Can he use the mapped graph, for example?
I'm opening this issue because i couldn't find a way to identify the output neurons, after hardware deployment, on DYNAP-SE2: