Git Product home page Git Product logo

spiking-neural-network's People

Contributors

arpanvyas avatar shikhargupta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spiking-neural-network's Issues

calculating firing rate proportional to the membrane potential

/encoding
freq = interp(pot[l][m], [-1.069,2.781], [1,20])
/multi_layer
freq = math.ceil(0.102*pot[l][m] + 52.02)
freq1 = math.ceil(200/freq)

Hi:
I just started learning SNN. I want to know these numbers' meaning and formula that you use to calculate firing rate.

No module named numpy

Yo, I'm new to coding and for some reason it says no module named numpy, and unused statement import, but there's also a lot of marked warnings. How do I get this to work? I'm using pyCharm idk if I should use something else.

where is "rf" in receptive_field?

hey man, I am running your code rescently. It's a wonderful work. However, I met a question and I need your help.
When i run the classify.py in classification file, i found the error "from receptive_field import rf" was wrong. I check up the receptive_field file, there is not a "rf" in there. So where is "rf" in receptive_field?
Looking forward to your reply.

how do I input bigger size image ?

how do I input a bigger size image?

I get an error when I put bigger size image :

IndexError Traceback (most recent call last)
in
27 for n in ran:
28 if (i+m)>=0 and (i+m)<=255 and (j+n)>=0 and (j+n)<=255:
---> 29 summ = summ + w[ox+m][oy+n]*img[i+m][j+n]
30 pot[i][j] = summ
31

IndexError: index 217 is out of bounds for axis 0 with size 217

IndexError: index 16 is out of bounds for axis 0 with size 16

IndexError Traceback (most recent call last)
in ()
52
53 #Convolving image with receptive field
---> 54 pot = rf(img)
55
56 #Generating spike train

# C:\Users\pc\AnacondaProjects\Spiking-Neural-Network-master\training\recep_field.py in rf(inp)
35 for n in ran:
36 if (i+m)>=0 and (i+m)<=par.pixel_x-1 and (j+n)>=0 and (j+n)<=par.pixel_x-1:
---> 37 summ = summ + w[ox+m][oy+n]*inp[i+m][j+n]/255
38 pot[i][j] = summ
39 return pot

IndexError: index 16 is out of bounds for axis 0 with size 16

this happens when i change the image from 1.png to 100.png or 101.png given below to
for k in range(par.epoch):
for i in range(322,323):
print (i," ",k)
img = cv2.imread("images/100.png", 0)

A doubt about the snn network (on the neurodynamic explanation in the code)

Question:for j, x in enumerate(layer2):
active = []
if(x.t_rest<t):
x.P = x.P + np.dot(synapse[j], train[:,t])
if(x.P>par.Prest):
x.P -= par.D
active_pot[j] = x.P

   Dear researcher, bother you! 
   For the above intercepted code, I have a doubt and would like to communicate with you. 

For xP-= par.D . I still can't figure out the meaning of subtracting par.D. I checked the value of par.D, which is 0.75 in your document, and I looked up the relevant information, and I still don't know this clearly meaning.
At your convenience, would you please help me explain this problem?My email is [email protected]. Thank you very much and look forward to hearing from you!

Classification: recep_field.py

In the convolution part of the code the boundary for the window needs to be made 27 and not 15.
#Convolution
for i in range(28):
for j in range(28):
summ = 0
for m in ran:
for n in ran:
if (i+m)>=0 and (i+m)<=27 and (j+n)>=0 and (j+n)<=27:
summ = summ + w[ox+m][oy+n]*inp[i+m][j+n]/255
pot[i][j] = summ
return pot

ImportError :cannot import name 'reconst'

ImportError Traceback (most recent call last)
in ()
5 import cv2
6 from spike_train import encode
----> 7 from reconstruct import reconst
8 from weight_initialization import learned_weights_x
9 from weight_initialization import learned_weights_o

ImportError: cannot import name 'reconst'

classify error

I have a different classification results for each training.(I made n = 10 to recognize digits)
here are two different training results
322 0
winner is 2
322 1
winner is 2
322 2
winner is 2
322 3
winner is 2
322 4
winner is 2
322 5
winner is 2
322 6
winner is 2
322 7
winner is 2
322 8
winner is 2
322 9
winner is 2

322 0
winner is 4
322 1
winner is 4
322 2
winner is 4
322 3
winner is 4
322 4
winner is 4
322 5
winner is 4
322 6
winner is 4
322 7
winner is 4
322 8
winner is 4
322 9
winner is 4

classification

how can i use these spikes count in python that can classify images

accuracy

how to find the accuracy of classification results

'module' object is not callable

I'm new to python.
I'm getting this error when I run classify.py

TypeError Traceback (most recent call last)
in
29 # creating the hidden layer of neurons
30 for i in range(n):
---> 31 neuron(a)
32 layer2.append(a)
33

TypeError: 'module' object is not callable

please help me solve this error

Repository structure

Hello @Shikhargupta ,

Thank you for the great README about the Spiking Neural Network functioning, but I don't really understand the structure of the repository. For example, I don't get why there are many different "neuron.py", spike_train.py", "recep_field.py", ecc... files in different folders and if they are all necessary.
Is it also possible to run the code out of the box?

Thank you very much,
Gianluca

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.