Open Maya7991 opened 2 months ago
Hi Maya, the weights are provided in HWC format. It means that the shape tuple is (outputChannels, height, width, inputChannels).
Thank you @fabrizio-ottati for the answer. I have done QAT of weights of my SnnTorch model using the Brevitas library as suggested in the Python script. Then I have extracted and stored the INT8 weights using the following snippet as Brevitas does only fake quantization.
for name, module in model.named_modules():
if isinstance(module, qnn.QuantLinear):
quantized_weights[f'{name}.weight'] = module.quant_weight().int().detach().cpu().numpy()
Now, I have stored the weights. The Threshold of Leaky neuron is the default Threshold of 1V in my model. But how can I get the new Threshold value of the LIF neuron corresponding to the INT weights. Can I get this from the SnnTorch model? I am confused on how to determine this value and have been struggling with this for a long time. It will be of great help if you can answer this question. Given below are my neuron parameters:
beta = 1
spike_grad = surrogate.fast_sigmoid(slope=25)
self.lif= snn.Leaky(beta=beta, spike_grad=spike_grad, init_hidden=True)
Thank you for your time.
Hello,
Can you provide an example for the weights used? It will help me understand the format in which they must be provided
Thanks, Maya