Contrib, and user supplied connection matrices. #5
russelljjarvis
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
yes it is. or just use the default genPlasticWeights as you mentioned here: #1 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
-
note that the adjacency matrices are now vectors of vectors instead of ragged dense matrices. see 2282152 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I decided to restart the conversation here, since I realized I was no longer discussing an issue or a code break.
I made a PR, that shows how using the latest code changes, I can get pretty close to using plugin style connectivity matrices.
https://github.com/SpikingNetwork/TrainSpikingNet.jl/pull/4/files
StaticMatrices.jl almost work, PlasticWeightMatrices fail.
I wonder if it is possible to opt out of plastic simulations, by providing an empty Plastic weight Matrix?
The entry point to the code I provided is this:
This could also be regarded as a draft PR too. I might update it later.
Inside my code where I build the connection matrix, I save the matrix but I need to probably save it in the data-dir that the program user specifies, instead I save it in the
pwd
which might besrc/contrib
.I should update the code so any matrices are stored in the user specified
data_dir
.These are some files I changed:
https://github.com/russelljjarvis/TrainSpikingNet.jl/blob/master/src/contrib/Potjans_data/param.jl#L37-L55
I probably should convert the sparse matrices to dense before returning them.
https://github.com/russelljjarvis/TrainSpikingNet.jl/blob/connectomes/src/contrib/genPotjansConnectivity.jl#L244
julia> include("ConfigAndRunPotjans.jl")
LBTConfig([ILP64] libopenblas64_.so)
┌ Warning: running single threaded
└ @ TrainSpikingNet ~/build_testing/depth1/TrainSpikingNet.jl/src/paramfn.jl:57
p.genStaticWeights_file = "/home/rjjarvis/build_testing/depth1/TrainSpikingNet.jl/src/contrib/genPotjansConnectivity.jl"
Progress: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| Time: 0:00:11
┌──────────────────────────────┐
1 │⣿⣿⣿⣿⢏⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│ > 0
│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│ < 0
│⣀⣀⣸⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⢀⣀⠀⠀⠀⣀│
│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
│⠉⠉⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣋⡉⠉⠉⠉⠉⠉│
│⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠰⡅⠀⠀⠀⠀⠀│
│⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡋⡅⠀⠀⠀⠀⠀│
│⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡔⠂⠀⠀⠀⠀⠀│
│⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣷⣶⣶⣶⣶⣶│
│⣿⣿⣿⣿⠟⡻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
│⣿⣿⣿⣿⢽⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
2 577 │⣿⣿⣿⣿⡷⢓⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
└──────────────────────────────┘
⠀1⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀2 577⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀557 316 ≠ 0⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
┌──────────────────────────────┐
1 │⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│ > 0
│⠀⠀⠀⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│ < 0
│⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⢀⣀⠀⠀⠀⣀│
│⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
│⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
│⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
│⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
│⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣋⡉⠉⠉⠉⠉⠉│
│⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠰⡅⠀⠀⠀⠀⠀│
│⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡋⡅⠀⠀⠀⠀⠀│
│⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡔⠂⠀⠀⠀⠀⠀│
│⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣷⣶⣶⣶⣶⣶│
│⠀⠀⠀⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
│⠀⠀⠀⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
2 577 │⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│
└──────────────────────────────┘
⠀1⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀2 577⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀508 004 ≠ 0⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
┌──────────────────────────────┐
1 │⣿⣿⣿⣿⢏⣏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ > 0
│⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ < 0
│⣀⣀⣸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠉⠉⢹⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠀⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠀⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠀⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⣶⣶⣾⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⣿⣿⣿⣿⠟⡻⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⣿⣿⣿⣿⢽⣳⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
2 577 │⣿⣿⣿⣿⡷⢓⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
└──────────────────────────────┘
⠀1⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀2 577⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀49 315 ≠ 0⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
ERROR: LoadError: BoundsError: attempt to access 2577-element Vector{Float32} at index [0]
Stacktrace:
[1] getindex
@ ./array.jl:924 [inlined]
[2] loop_init(itask::Int64, learn_every::Nothing, stim_on::Nothing, stim_off::Float64, train_time::Float64, dt::Float64, Nsteps::Int64, Ncells::Int64, Ne::Int64, Lei::Nothing, LX::Int64, refrac::Float64, learn_step::Int64, invtau_bale::Float32, invtau_bali::Float32, invtau_plas::Nothing, X_bal::Vector{Float32}, maxTimes::Nothing, times::Nothing, ns::Vector{UInt32}, timesX::Nothing, nsX::Vector{UInt32}, inputsE::Vector{Float32}, inputsI::Vector{Float32}, inputsP::Nothing, inputsEPrev::Vector{Float32}, inputsIPrev::Vector{Float32}, inputsPPrev::Nothing, spikes::Nothing, spikesPrev::Nothing, spikesX::Nothing, spikesXPrev::Nothing, u_bale::Vector{Float32}, u_bali::Vector{Float32}, uX_plas::Nothing, u_bal::Vector{Float32}, u::Vector{Float32}, r::Nothing, rX::Nothing, X::Vector{Float32}, wid::Nothing, example_neurons::Nothing, lastSpike::Vector{Float64}, plusone::Nothing, exactlyzero::Nothing, PScale::Nothing, raug::Nothing, k::Nothing, v::Vector{Float32}, rng::Random.TaskLocalRNG, noise::Vector{Float32}, rndX::Vector{Float32}, sig::Vector{Float32}, P::Nothing, w0Index::SparseArrays.SparseMatrixCSC{Int64, Int64}, w0Weights::SparseArrays.SparseMatrixCSC{Float32, Int64}, nc0::Vector{Int64}, X_stim::Nothing, utarg::Nothing, wpIndexIn::Nothing, wpIndexOut::Nothing, wpIndexConvert::Nothing, wpWeightX::Nothing, wpWeightIn::Nothing, wpWeightOut::Nothing, ncpIn::Nothing, ncpOut::Nothing, uavg::Vector{Float64}, ustd::Matrix{Float64}, rateX::Matrix{Float64}, cellModel_args::NamedTuple{(:thresh, :invtau_mem, :vre, :dt), Tuple{Vector{Float32}, Vector{Float32}, Float64, Float64}})
@ TrainSpikingNet ~/build_testing/depth1/TrainSpikingNet.jl/src/cpu/loop.jl:248
[3] init(; itasks::Vector{Int64}, utarg_file::Nothing, spikerate_file::Nothing)
@ TrainSpikingNet ~/build_testing/depth1/TrainSpikingNet.jl/src/initfn.jl:9
[4] init()
@ TrainSpikingNet ~/build_testing/depth1/TrainSpikingNet.jl/src/initfn.jl:1
[5] top-level scope
@ ~/build_testing/depth1/TrainSpikingNet.jl/src/contrib/ConfigAndRunPotjans.jl:40
[6] include(fname::String)
@ Base.MainInclude ./client.jl:476
[7] top-level scope
@ REPL[1]:1
[8] top-level scope
@ ~/.julia/packages/CUDA/BbliS/src/initialization.jl:52
in expression starting at /home/rjjarvis/build_testing/depth1/TrainSpikingNet.jl/src/contrib/ConfigAndRunPotjans.jl:40
Beta Was this translation helpful? Give feedback.
All reactions