I tried the code mentioned in the article in google colab.
https://theaisummer.com/spiking-neural-networks/
I got the error that looks like this...
Test loss: 8.86368179321289
Test loss: 5.338221073150635
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-9-646cb112ccb7> in <module>()
15 # forward pass
16 net.train()
---> 17 spk_rec, mem_rec = net(data.view(batch_size, -1))
18
19 # initialize the loss & sum over time
4 frames
/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py in linear(input, weight, bias)
1846 if has_torch_function_variadic(input, weight, bias):
1847 return handle_torch_function(linear, (input, weight, bias), input, weight, bias=bias)
-> 1848 return torch._C._nn.linear(input, weight, bias)
1849
1850
RuntimeError: mat1 and mat2 shapes cannot be multiplied (128x588 and 784x1000)
I am not sure how to fix it.