Comments (2)
Hello, .init_weights()
is an internal method to be used for weight initialization. It should not be exposed to users.
Instead, if you want to change weight, please use g_max
argument. Moreover, weight initialization in BrainPy models is very very flexible. I will show you several examples.
For your purpose, you can set the scalar weight 0.
as:
E2E = bp.synapses.Exponential(E, E, bp.conn.FixedProb(prob=0.02),
g_max=0., # set weights here!!!!!
tau=5., output=bp.synouts.COBA(E=0.),
method='exp_auto')
After this setting, the network will also show spikes, this is because the background inputs are strong to trigger the neurons to spike. Removing the background inputs will silent the whole network.
However, it you want to set the heterogenous weights, you can use:
E2E = bp.synapses.Exponential(E, E, bp.conn.FixedProb(prob=0.02),
g_max=bp.init.Uniform(0., 1.), # set weights HERE!!!
tau=5., output=bp.synouts.COBA(E=0.),
method='exp_auto')
More details please see our document: https://brainpy.readthedocs.io/en/latest/tutorial_building/overview_of_dynamic_model.html#initializing-a-synapse-model
Please update this issue if you have more questions!
from brainpy.
Since it has been two weeks without additional questions, we suppose this issue has been solved and we have decided to close it.
from brainpy.
Related Issues (20)
- Difference between the recorded conductance of Alpha synapse and the convolution of alpha function to spike trains. HOT 2
- softplus is not correct HOT 2
- TypeError when running a simulation HOT 2
- Questions on the definition of .update() function HOT 6
- Question about clearing memory HOT 7
- How to implement gradient accumulation in BrainPy HOT 5
- Using custom iterable or functional input in DSTrainer HOT 21
- Questions are the activation of neurons when input is current HOT 2
- Using `jax.disable_jit()` cannot disable jit for `bm.scan` HOT 3
- How to index and slice in the loss function during training HOT 8
- Convert a BrainPy model to process batched input by `jax.vmap` HOT 2
- Reopen issue #599 (memory issue) HOT 3
- Manually resetting BrainPy's delay variables cause JAX leaking error HOT 7
- Gradient accumulation generates JAX leaking error in BrainPy 2.5.0 HOT 3
- 2D bifurcation for 3+ D dynamical systems HOT 3
- Questions about backpropagation through delay variables HOT 6
- Monitor ion channel current with built-in models HOT 7
- Questions about writing custom gradient functions in BrainPy HOT 8
- multiple GPU devices simulation and training of one dynamic system in brainpy HOT 15
- How to view the computational graph in BrainPy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brainpy.