Note
All history release notes please see GitHub releases.
BrainPy 2.2.x is a complete re-design of the framework, tackling the shortcomings of brainpy 2.1.x generation, effectively bringing it to research needs and standards.
This release fixes bugs found in the codebase and improves the usability and functions of BrainPy.
- Fix the bug of operator customization in
brainpy.math.XLACustomOp
andbrainpy.math.register_op
. Now, it supports operator customization by using NumPy and Numba interface. For instance,
import brainpy.math as bm
def abs_eval(events, indices, indptr, post_val, values):
return post_val
def con_compute(outs, ins):
post_val = outs
events, indices, indptr, _, values = ins
for i in range(events.size):
if events[i]:
for j in range(indptr[i], indptr[i + 1]):
index = indices[j]
old_value = post_val[index]
post_val[index] = values + old_value
event_sum = bm.XLACustomOp(eval_shape=abs_eval, con_compute=con_compute)
- Fix the bug of
brainpy.tools.DotDict
. Now, it is compatible with the transformations of JAX. For instance,
import brainpy as bp
from jax import vmap
@vmap
def multiple_run(I):
hh = bp.neurons.HH(1)
runner = bp.dyn.DSRunner(hh, inputs=('input', I), numpy_mon_after_run=False)
runner.run(100.)
return runner.mon
mon = multiple_run(bp.math.arange(2, 10, 2))
- Add numpy operators
brainpy.math.mat
,brainpy.math.matrix
,brainpy.math.asmatrix
. - Improve translation rules of brainpylib operators, improve its running speeds.
- Support
DSView
ofDynamicalSystem
instance. Now, it supports defining models with a slice view of a DS instance. For example,
import brainpy as bp
import brainpy.math as bm
class EINet_V2(bp.dyn.Network):
def __init__(self, scale=1.0, method='exp_auto'):
super(EINet_V2, self).__init__()
# network size
num_exc = int(3200 * scale)
num_inh = int(800 * scale)
# neurons
self.N = bp.neurons.LIF(num_exc + num_inh,
V_rest=-60., V_th=-50., V_reset=-60., tau=20., tau_ref=5.,
method=method, V_initializer=bp.initialize.Normal(-55., 2.))
# synapses
we = 0.6 / scale # excitatory synaptic weight (voltage)
wi = 6.7 / scale # inhibitory synaptic weight
self.Esyn = bp.synapses.Exponential(pre=self.N[:num_exc], post=self.N,
conn=bp.connect.FixedProb(0.02),
g_max=we, tau=5.,
output=bp.synouts.COBA(E=0.),
method=method)
self.Isyn = bp.synapses.Exponential(pre=self.N[num_exc:], post=self.N,
conn=bp.connect.FixedProb(0.02),
g_max=wi, tau=10.,
output=bp.synouts.COBA(E=-80.),
method=method)
net = EINet_V2(scale=1., method='exp_auto')
# simulation
runner = bp.dyn.DSRunner(
net,
monitors={'spikes': net.N.spike},
inputs=[(net.N.input, 20.)]
)
runner.run(100.)
# visualization
bp.visualize.raster_plot(runner.mon.ts, runner.mon['spikes'], show=True)
This release has provided important improvements for BrainPy, including usability, speed, functions, and others.
brainpy.nn
module is no longer supported and has been removed since version 2.2.0. Instead, users should usebrainpy.train
module for the training of BP algorithms, online learning, or offline learning algorithms, andbrainpy.algorithms
module for online / offline training algorithms.- The
update()
function for the model definition has been changed:
>>> # 2.1.x >>> >>> import brainpy as bp >>> >>> class SomeModel(bp.dyn.DynamicalSystem): >>> def __init__(self, ): >>> ...... >>> def update(self, t, dt): >>> pass >>> # 2.2.x >>> >>> import brainpy as bp >>> >>> class SomeModel(bp.dyn.DynamicalSystem): >>> def __init__(self, ): >>> ...... >>> def update(self, tdi): >>> t, dt = tdi.t, tdi.dt >>> pass
where tdi
can be defined with other names, like sha
, to represent the shared argument across modules.
brainpy.dyn.xxx (neurons)
andbrainpy.dyn.xxx (synapse)
are no longer supported. Please usebrainpy.neurons
,brainpy.synapses
modules.brainpy.running.monitor
has been removed.brainpy.nn
module has been removed.
brainpy.math.Variable
receives abatch_axis
setting to represent the batch axis of the data.
>>> import brainpy.math as bm >>> a = bm.Variable(bm.zeros((1, 4, 5)), batch_axis=0) >>> a.value = bm.zeros((2, 4, 5)) # success >>> a.value = bm.zeros((1, 2, 5)) # failed MathError: The shape of the original data is (2, 4, 5), while we got (1, 2, 5) with batch_axis=0.
brainpy.train
providesbrainpy.train.BPTT
for back-propagation algorithms,brainpy.train.Onlinetrainer
for online training algorithms,brainpy.train.OfflineTrainer
for offline training algorithms.brainpy.Base
class supports_excluded_vars
setting to ignore variables when retrieving variables by usingBase.vars()
method.
>>> class OurModel(bp.Base): >>> _excluded_vars = ('a', 'b') >>> def __init__(self): >>> super(OurModel, self).__init__() >>> self.a = bm.Variable(bm.zeros(10)) >>> self.b = bm.Variable(bm.ones(20)) >>> self.c = bm.Variable(bm.random.random(10)) >>> >>> model = OurModel() >>> model.vars().keys() dict_keys(['OurModel0.c'])
brainpy.analysis.SlowPointFinder
supports directly analyzing an instance ofbrainpy.dyn.DynamicalSystem
.
>>> hh = bp.neurons.HH(1) >>> finder = bp.analysis.SlowPointFinder(hh, target_vars={'V': hh.V, 'm': hh.m, 'h': hh.h, 'n': hh.n})
brainpy.datasets
supports MNIST, FashionMNIST, and other datasets.- Supports defining conductance-based neuron models``.
>>> class HH(bp.dyn.CondNeuGroup): >>> def __init__(self, size): >>> super(HH, self).__init__(size) >>> >>> self.INa = channels.INa_HH1952(size, ) >>> self.IK = channels.IK_HH1952(size, ) >>> self.IL = channels.IL(size, E=-54.387, g_max=0.03)
brainpy.layers
module provides commonly used models for DNN and reservoir computing.- Support composable definition of synaptic models by using
TwoEndConn
,SynOut
,SynSTP
andSynLTP
.
>>> bp.synapses.Exponential(self.E, self.E, bp.conn.FixedProb(prob), >>> g_max=0.03 / scale, tau=5, >>> output=bp.synouts.COBA(E=0.), >>> stp=bp.synplast.STD())
- Provide commonly used surrogate gradient function for spiking generation, including
brainpy.math.spike_with_sigmoid_grad
brainpy.math.spike_with_linear_grad
brainpy.math.spike_with_gaussian_grad
brainpy.math.spike_with_mg_grad
- Provide shortcuts for GPU memory management via
brainpy.math.disable_gpu_memory_preallocation()
, andbrainpy.math.clear_buffer_memory()
.
- fix #207: synapses update first, then neurons, finally delay variables by @chaoming0625 in #219
- docs: add logos by @ztqakita in #218
- Add the biological NMDA model by @c-xy17 in #221
- docs: fix mathjax problem by @ztqakita in #222
- Add the parameter R to the LIF model by @c-xy17 in #224
- new version of brainpy: V2.2.0-rc1 by @chaoming0625 in #226
- update training apis by @chaoming0625 in #227
- Update quickstart and the analysis module by @c-xy17 in #229
- Eseential updates for montors, analysis, losses, and examples by @chaoming0625 in #230
- add numpy op tests by @ztqakita in #231
- Integrated simulation, simulaton and analysis by @chaoming0625 in #232
- update docs by @chaoming0625 in #233
- unify
brainpy.layers
with other modules inbrainpy.dyn
by @chaoming0625 in #234 - fix bugs by @chaoming0625 in #235
- update apis, docs, examples and others by @chaoming0625 in #236
- fixes by @chaoming0625 in #237
- fix: add dtype promotion = standard by @ztqakita in #239
- updates by @chaoming0625 in #240
- update training docs by @chaoming0625 in #241
- change doc path/organization by @chaoming0625 in #242
- Update advanced docs by @chaoming0625 in #243
- update quickstart docs & enable jit error checking by @chaoming0625 in #244
- update apis and examples by @chaoming0625 in #245
- update apis and tests by @chaoming0625 in #246
- Docs update and bugs fixed by @ztqakita in #247
- version 2.2.0 by @chaoming0625 in #248
- add norm and pooling & fix bugs in operators by @ztqakita in #249
Full Changelog: V2.1.12...V2.2.0
This release is excellent. We have made important improvements.
- We provide dozens of random sampling in NumPy which are not
supportted in JAX, such as
brainpy.math.random.bernoulli
,brainpy.math.random.lognormal
,brainpy.math.random.binomial
,brainpy.math.random.chisquare
,brainpy.math.random.dirichlet
,brainpy.math.random.geometric
,brainpy.math.random.f
,brainpy.math.random.hypergeometric
,brainpy.math.random.logseries
,brainpy.math.random.multinomial
,brainpy.math.random.multivariate_normal
,brainpy.math.random.negative_binomial
,brainpy.math.random.noncentral_chisquare
,brainpy.math.random.noncentral_f
,brainpy.math.random.power
,brainpy.math.random.rayleigh
,brainpy.math.random.triangular
,brainpy.math.random.vonmises
,brainpy.math.random.wald
,brainpy.math.random.weibull
- make efficient checking on numerical values. Instead of direct
id_tap()
checking which has large overhead, currentlybrainpy.tools.check_erro_in_jit()
is highly efficient. - Fix
JaxArray
operator errors onNone
- improve oo-to-function transformation speeds
io
works:.save_states()
and.load_states()
- support dtype setting in array interchange functions by [@chaoming0625](https://github.com/chaoming0625) in #209
- fix #144: operations on None raise errors by [@chaoming0625](https://github.com/chaoming0625) in #210
- add tests and new functions for random sampling by [@c-xy17](https://github.com/c-xy17) in #213
- feat: fix
io
for brainpy.Base by [@chaoming0625](https://github.com/chaoming0625) in #211 - update advanced tutorial documentation by [@chaoming0625](https://github.com/chaoming0625) in #212
- fix #149 (dozens of random samplings in NumPy) and fix JaxArray op errors by [@chaoming0625](https://github.com/chaoming0625) in #216
- feat: efficient checking on numerical values by [@chaoming0625](https://github.com/chaoming0625) in #217
Full Changelog: V2.1.11...V2.1.12
- fix: cross-correlation bug by @ztqakita in #201
- update apis, test and docs of numpy ops by @chaoming0625 in #202
- docs: add sphinx_book_theme by @ztqakita in #203
- fix: add requirements-doc.txt by @ztqakita in #204
- update control flow, integrators, operators, and docs by @chaoming0625 in #205
- improve oo-to-function transformation speed by @chaoming0625 in #208
Full Changelog: V2.1.10...V2.1.11
- update control flow APIs and Docs by @chaoming0625 in #192
- doc: update docs of dynamics simulation by @chaoming0625 in #193
- fix #125: add channel models and two-compartment Pinsky-Rinzel model by @chaoming0625 in #194
- JIT errors do not change Variable values by @chaoming0625 in #195
- fix a bug in math.activations.py by @c-xy17 in #196
- Functionalinaty improvements by @chaoming0625 in #197
- update rate docs by @chaoming0625 in #198
- update brainpy.dyn doc by @chaoming0625 in #199
Full Changelog: V2.1.8...V2.1.10
- Fix #120 by @chaoming0625 in #178
- feat: brainpy.Collector supports addition and subtraction by @chaoming0625 in #179
- feat: delay variables support "indices" and "reset()" function by @chaoming0625 in #180
- Support reset functions in neuron and synapse models by @chaoming0625 in #181
update()
function on longer need_t
and_dt
by @chaoming0625 in #183- small updates by @chaoming0625 in #188
- feat: easier control flows with
brainpy.math.ifelse
by @chaoming0625 in #189 - feat: update delay couplings of
DiffusiveCoupling
andAdditiveCouping
by @chaoming0625 in #190 - update version and changelog by @chaoming0625 in #191
Full Changelog: V2.1.7...V2.1.8
- synapse models support heterogeneuos weights by @chaoming0625 in #170
- more efficient synapse implementation by @chaoming0625 in #171
- fix input models in brainpy.dyn by @chaoming0625 in #172
- fix: np array astype by @ztqakita in #173
- update README: 'brain-py' to 'brainpy' by @chaoming0625 in #174
- fix: fix the updating rules in the STP model by @c-xy17 in #176
- Updates and fixes by @chaoming0625 in #177
Full Changelog: V2.1.5...V2.1.7
brainpy.math.random.shuffle
is numpy like by @chaoming0625 in #153- update LICENSE by @chaoming0625 in #155
- docs: add m1 warning by @ztqakita in #154
- compatible apis of 'brainpy.math' with those of 'jax.numpy' in most modules by @chaoming0625 in #156
- Important updates by @chaoming0625 in #157
- Updates by @chaoming0625 in #159
- Add LayerNorm, GroupNorm, and InstanceNorm as nn_nodes in normalization.py by @c-xy17 in #162
- feat: add conv & pooling nodes by @ztqakita in #161
- fix: update setup.py by @ztqakita in #163
- update setup.py by @chaoming0625 in #165
- fix: change trigger condition by @ztqakita in #166
- fix: add build_conn() function by @ztqakita in #164
- update synapses by @chaoming0625 in #167
- get the deserved name: brainpy by @chaoming0625 in #168
- update tests by @chaoming0625 in #169
Full Changelog: V2.1.4...V2.1.5
- fix doc parsing bug by @chaoming0625 in #127
- Update overview_of_dynamic_model.ipynb by @c-xy17 in #129
- Reorganization of
brainpylib.custom_op
and adding interface inbrainpy.math
by @ztqakita in #128 - Fix: modify
register_op
and brainpy.math interface by @ztqakita in #130 - new features about RNN training and delay differential equations by @chaoming0625 in #132
- Fix #123: Add low-level operators docs and modify register_op by @ztqakita in #134
- feat: add generate_changelog by @ztqakita in #135
- fix #133, support batch size training with offline algorithms by @chaoming0625 in #136
- fix #84: support online training algorithms by @chaoming0625 in #137
- feat: add the batch normalization node by @c-xy17 in #138
- fix: fix shape checking error by @chaoming0625 in #139
- solve #131, support efficient synaptic computation for special connection types by @chaoming0625 in #140
- feat: update the API and test for batch normalization by @c-xy17 in #142
- Node is default trainable by @chaoming0625 in #143
- Updates training apis and docs by @chaoming0625 in #145
- fix: add dependencies and update version by @ztqakita in #147
- update requirements by @chaoming0625 in #146
- data pass of the Node is default SingleData by @chaoming0625 in #148
Full Changelog: V2.1.3...V2.1.4
This release improves the functionality and usability of BrainPy. Core changes include
- support customization of low-level operators by using Numba
- fix bugs
- Provide custom operators written in numba for jax jit by @ztqakita in #122
- fix DOGDecay bugs, add more features by @chaoming0625 in #124
- fix bugs by @chaoming0625 in #126
Full Changelog : V2.1.2...V2.1.3
This release improves the functionality and usability of BrainPy. Core changes include
- support rate-based whole-brain modeling
- add more neuron models, including rate neurons/synapses
- support Python 3.10
- improve delays etc. APIs
- fix matplotlib dependency on "brainpy.analysis" module by @chaoming0625 in #110
- Sync master to brainpy-2.x branch by @ztqakita in #111
- add py3.6 test & delete multiple macos env by @ztqakita in #112
- Modify ci by @ztqakita in #113
- Add py3.10 test by @ztqakita in #115
- update python version by @chaoming0625 in #114
- add brainpylib mac py3.10 by @ztqakita in #116
- Enhance measure/input/brainpylib by @chaoming0625 in #117
- fix #105: Add customize connections docs by @ztqakita in #118
- fix bugs by @chaoming0625 in #119
- Whole brain modeling by @chaoming0625 in #121
Full Changelog: V2.1.1...V2.1.2
This release continues to update the functionality of BrainPy. Core changes include
- numerical solvers for fractional differential equations
- more standard
brainpy.nn
interfaces
- Numerical solvers for fractional differential equations
brainpy.fde.CaputoEuler
brainpy.fde.CaputoL1Schema
brainpy.fde.GLShortMemory
- Fractional neuron models
brainpy.dyn.FractionalFHR
brainpy.dyn.FractionalIzhikevich
- support
shared_kwargs
in RNNTrainer and RNNRunner
We are excited to announce the release of BrainPy 2.1.0. This release is composed of nearly 270 commits since 2.0.2, made by Chaoming Wang, Xiaoyu Chen, and Tianqiu Zhang .
BrainPy 2.1.0 updates are focused on improving usability, functionality, and stability of BrainPy. Highlights of version 2.1.0 include:
- New module
brainpy.dyn
for dynamics building and simulation. It is composed of many neuron models, synapse models, and others. - New module
brainpy.nn
for neural network building and training. It supports to define reservoir models, artificial neural networks, ridge regression training, and back-propagation through time training. - New module
brainpy.datasets
for convenient dataset construction and initialization. - New module
brainpy.integrators.dde
for numerical integration of delay differential equations. - Add more numpy-like operators in
brainpy.math
module. - Add automatic continuous integration on Linux, Windows, and MacOS platforms.
- Fully update brainpy documentation.
- Fix bugs on
brainpy.analysis
andbrainpy.math.autograd
- Remove
brainpy.math.numpy
module. - Remove numba requirements
- Remove matplotlib requirements
- Remove steps in
brainpy.dyn.DynamicalSystem
- Remove travis CI
brainpy.ddeint
for numerical integration of delay differential equations, the supported methods include:- Euler
- MidPoint
- Heun2
- Ralston2
- RK2
- RK3
- Heun3
- Ralston3
- SSPRK3
- RK4
- Ralston4
- RK4Rule38
- set default int/float/complex types
brainpy.math.set_dfloat()
brainpy.math.set_dint()
brainpy.math.set_dcomplex()
- Delay variables
brainpy.math.FixedLenDelay
brainpy.math.NeutralDelay
- Dedicated operators
brainpy.math.sparse_matmul()
More numpy-like operators
Neural network building
brainpy.nn
Dynamics model building and simulation
brainpy.dyn
There are important updates by Chaoming Wang in BrainPy 2.0.2.
- provide
pre2post_event_prod
operator - support array creation from a list/tuple of JaxArray in
brainpy.math.asarray
andbrainpy.math.array
- update
brainpy.ConstantDelay
, add.latest
and.oldest
attributes - add
brainpy.IntegratorRunner
support for efficient simulation of brainpy integrators - support auto finding of RandomState when JIT SDE integrators
- fix bugs in SDE
exponential_euler
method - move
parallel
running APIs intobrainpy.simulation
- add
brainpy.math.syn2post_mean
,brainpy.math.syn2post_softmax
,brainpy.math.pre2post_mean
andbrainpy.math.pre2post_softmax
operators
Today we release BrainPy 2.0.1. This release is composed of over 70 commits since 2.0.0, made by Chaoming Wang, Xiaoyu Chen, and Tianqiu Zhang .
BrainPy 2.0.0 updates are focused on improving documentation and operators. Core changes include:
- Improve
brainpylib
operators - Complete documentation for programming system
- Add more numpy APIs
- Add
jaxfwd
in autograd module - And other changes
- Add progress bar in
brainpy.StructRunner
Start a new version of BrainPy.
We are excited to announce the release of BrainPy 2.0.0. This release is composed of over 260 commits since 1.1.7, made by Chaoming Wang, Xiaoyu Chen, and Tianqiu Zhang .
BrainPy 2.0.0 updates are focused on improving performance, usability and consistence of BrainPy.
All the computations are migrated into JAX. Model building
, simulation
, training
and analysis
are all based on JAX. Highlights of version 2.0.0 include:
- brainpylib are provided to dedicated operators for brain dynamics programming
- Connection APIs in
brainpy.conn
module are more efficient. - Update analysis tools for low-dimensional and high-dimensional systems in
brainpy.analysis
module. - Support more general Exponential Euler methods based on automatic differentiation.
- Improve the usability and consistence of
brainpy.math
module. - Remove JIT compilation based on Numba.
- Separate brain building with brain simulation.
- remove
brainpy.math.use_backend()
- remove
brainpy.math.numpy
module - no longer support
.run()
inbrainpy.DynamicalSystem
(see New Features) - remove
brainpy.analysis.PhasePlane
(see New Features) - remove
brainpy.analysis.Bifurcation
(see New Features) - remove
brainpy.analysis.FastSlowBifurcation
(see New Features)
- Exponential Euler method based on automatic differentiation
brainpy.ode.ExpEulerAuto
- Numerical optimization based low-dimensional analyzers:
brainpy.analysis.PhasePlane1D
brainpy.analysis.PhasePlane2D
brainpy.analysis.Bifurcation1D
brainpy.analysis.Bifurcation2D
brainpy.analysis.FastSlow1D
brainpy.analysis.FastSlow2D
- Numerical optimization based high-dimensional analyzer:
brainpy.analysis.SlowPointFinder
- Dedicated operators in
brainpy.math
module: brainpy.math.pre2post_event_sum
brainpy.math.pre2post_sum
brainpy.math.pre2post_prod
brainpy.math.pre2post_max
brainpy.math.pre2post_min
brainpy.math.pre2syn
brainpy.math.syn2post
brainpy.math.syn2post_prod
brainpy.math.syn2post_max
brainpy.math.syn2post_min
- Dedicated operators in
- Conversion APIs in
brainpy.math
module: brainpy.math.as_device_array()
brainpy.math.as_variable()
brainpy.math.as_jaxarray()
- Conversion APIs in
- New autograd APIs in
brainpy.math
module: brainpy.math.vector_grad()
- New autograd APIs in
- Simulation runners:
brainpy.ReportRunner
brainpy.StructRunner
brainpy.NumpyRunner
- Commonly used models in
brainpy.models
module brainpy.models.LIF
brainpy.models.Izhikevich
brainpy.models.AdExIF
brainpy.models.SpikeTimeInput
brainpy.models.PoissonInput
brainpy.models.DeltaSynapse
brainpy.models.ExpCUBA
brainpy.models.ExpCOBA
brainpy.models.AMPA
brainpy.models.GABAa
- Commonly used models in
- Naming cache clean:
brainpy.clear_name_cache
- add safe in-place operations of
update()
method and.value
assignment for JaxArray
- Complete tutorials for quickstart
- Complete tutorials for dynamics building
- Complete tutorials for dynamics simulation
- Complete tutorials for dynamics training
- Complete tutorials for dynamics analysis
- Complete tutorials for API documentation
If you are using brainpy==1.x
, you can find documentation, examples, and models through the following links:
- Documentation: https://brainpy.readthedocs.io/en/brainpy-1.x/
- Examples from papers: https://brainpy-examples.readthedocs.io/en/brainpy-1.x/
- Canonical brain models: https://brainmodels.readthedocs.io/en/brainpy-1.x/
- fix bugs on
numpy_array()
conversion in brainpy.math.utils module
API changes:
- fix bugs on ndarray import in brainpy.base.function.py
- convenient 'get_param' interface brainpy.simulation.layers
- add more weight initialization methods
Doc changes:
- add more examples in README
API changes:
- add
.struct_run()
in DynamicalSystem - add
numpy_array()
conversion in brainpy.math.utils module - add
Adagrad
,Adadelta
,RMSProp
optimizers - remove setting methods in brainpy.math.jax module
- remove import jax in brainpy.__init__.py and enable jax setting, including
enable_x64()
set_platform()
set_host_device_count()
- enable
b=None
as no bias in brainpy.simulation.layers - set int_ and float_ as default 32 bits
- remove
dtype
setting in Initializer constructor
Doc changes:
- add
optimizer
in "Math Foundation" - add
dynamics training
docs - improve others
- fix bugs of JAX parallel API imports
- fix bugs of post_slice structure construction
- update docs
- add
pre2syn
andsyn2post
operators - add verbose and check option to
Base.load_states()
- fix bugs on JIT DynamicalSystem (numpy backend)
- fix bugs on symbolic analysis: model trajectory
- change absolute access in the variable saving and loading to the relative access
- add UnexpectedTracerError hints in JAX transformation functions
This package releases a new version of BrainPy.
Highlights of core changes:
- support numpy backend
- support JAX backend
- support
jit
,vmap
andpmap
on class objects on JAX backend - support
grad
,jacobian
,hessian
on class objects on JAX backend - support
make_loop
,make_while
, andmake_cond
on JAX backend - support
jit
(based on numba) on class objects on numpy backend - unified numpy-like ndarray operation APIs
- numpy-like random sampling APIs
- FFT functions
- gradient descent optimizers
- activation functions
- loss function
- backend settings
Base
for whole Version ecosystemFunction
to wrap functionsCollector
andTensorCollector
to collect variables, integrators, nodes and others
- class integrators for ODE numerical methods
- class integrators for SDE numerical methods
- support modular and composable programming
- support multi-scale modeling
- support large-scale modeling
- support simulation on GPUs
- fix bugs on
firing_rate()
- remove
_i
inupdate()
function, replace_i
with_dt
, meaning the dynamic system has the canonic equation form of dx/dt = f(x, t, dt) - reimplement the
input_step
andmonitor_step
in a more intuitive way - support to set dt in the single object level (i.e., single instance of DynamicSystem)
- common used DNN layers
- weight initializations
- refine synaptic connections
Fix bugs on
- firing rate measurement
- stability analysis
This release continues to improve the user-friendliness.
Highlights of core changes:
- Remove support for Numba-CUDA backend
- Super initialization super(XXX, self).__init__() can be done at anywhere (not required to add at the bottom of the __init__() function).
- Add the output message of the step function running error.
- More powerful support for Monitoring
- More powerful support for running order scheduling
- Remove unsqueeze() and squeeze() operations in
brainpy.ops
- Add reshape() operation in
brainpy.ops
- Improve docs for numerical solvers
- Improve tests for numerical solvers
- Add keywords checking in ODE numerical solvers
- Add more unified operations in brainpy.ops
- Support "@every" in steps and monitor functions
- Fix ODE solver bugs for class bounded function
- Add build phase in Monitor
- Fix bugs
- NEW VERSION OF BRAINPY
- Change the coding style into the object-oriented programming
- Systematically improve the documentation
- Add 'timeout' in sympy solver in neuron dynamics analysis
- Reconstruct and generalize phase plane analysis
- Generalize the repeat mode of
Network
to different running duration between two runs - Update benchmarks
- Update detailed documentation
- Add a more flexible way for NeuState/SynState initialization
- Fix bugs of "is_multi_return"
- Add "hand_overs", "requires" and "satisfies".
- Update documentation
- Auto-transform range to numba.prange
- Support _obj_i, _pre_i, _post_i for more flexible operation in scalar-based models
- Rename "brainpy.numpy" to "brainpy.backend"
- Delete "pytorch", "tensorflow" backends
- Add "numba" requirement
- Add GPU support
- Delete "backend" profile setting, add "jit"
- Delete "autopepe8" requirement
- Delete the format code prefix
- Change keywords "_t_, _dt_, _i_" to "_t, _dt, _i"
- Change the "ST" declaration out of "requires"
- Add "repeat" mode run in Network
- Change "vector-based" to "mode" in NeuType and SynType definition
- Remove "pypi" installation, installation now only rely on "conda"
- Fix bugs
- Add "animate_1D" in
visualization
module - Add "PoissonInput", "SpikeTimeInput" and "FreqInput" in
inputs
module - Update phase_portrait_analyzer.py
- Add CANN examples
- Redesign visualization
- Redesign connectivity
- Update docs
- Fix bugs in numba import
- Fix bugs in numpy mode with scalar model
- For computation:
numpy
,numba
- For model definition:
NeuType
,SynConn
- For model running:
Network
,NeuGroup
,SynConn
,Runner
- For numerical integration:
integrate
,Integrator
,DiffEquation
- For connectivity:
One2One
,All2All
,GridFour
,grid_four
,GridEight
,grid_eight
,GridN
,FixedPostNum
,FixedPreNum
,FixedProb
,GaussianProb
,GaussianWeight
,DOG
- For visualization:
plot_value
,plot_potential
,plot_raster
,animation_potential
- For measurement:
cross_correlation
,voltage_fluctuation
,raster_plot
,firing_rate
- For inputs:
constant_current
,spike_current
,ramp_current
.
- Neuron models:
HH model
,LIF model
,Izhikevich model
- Synapse models:
AMPA
,GABA
,NMDA
,STP
,GapJunction
- Network models:
gamma oscillation