Skip to content

A Spiking Neural Network (SNN) framework with Julia for fast simulation on GPU

License

Notifications You must be signed in to change notification settings

mahbodnr/FastSpike.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastSpike.jl

Stable

A Spiking Neural Network (SNN) simulation framework. FastSpike is designed to exploit the GPU memory in order to increase the speed of simulation as much as possible.

Please refer to examples/ for more information. Python implementation: FastSpike

Getting started

Installation

pkg> add https://github.com/mahbodnr/FastSpike.jl

Make a model

using FastSpike
model = Network(Izhikevich("fast spiking"))
group_A = add_group!(model, 1000; name= "A")
group_B = add_group!(model, 1000; name= "B")

Heterogeneous Izhikevich neurons (Izhikevich 2003)

r = rand(N, 1)
a = reshape(0.02 .* excitatory + (0.02 .+ 0.08 .* r) .* inhibitory, (1, N))
b = reshape(0.2 .* excitatory + (0.25 .- 0.05 .* r) .* inhibitory, (1, N)) 
c = reshape((-65 .+ 15 .* r .^ 2) .* excitatory + (-65) .* inhibitory, (1, N)) 
d = reshape((8 .- 6 .* r .^ 2) .* excitatory + 2 .* inhibitory, (1, N))

model = Network(
    neurons = Izhikevich(dt= dt, a= a, b= b, c= c, d= d, v_thresh= 30.0),
    learning_rule = STDP(A₊= 0.05, A₋= 0.05, τ₊= 20, τ₋= 20)
)

Run the model

model = model |> gpu
run!(
  model; 
  input_voltage= rand(Bool, batch_size, N) |> gpu
)

About

A Spiking Neural Network (SNN) framework with Julia for fast simulation on GPU

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages