Releases: brainpy/BrainPy
Version 2.6.0
New Features
This release provides several new features, including:
MLIR
registered operator customization interface inbrainpy.math.XLACustomOp
.- Operator customization with CuPy JIT interface.
- Bug fixes.
What's Changed
- [doc] Fix the wrong path of more examples of
operator customized with taichi.ipynb
by @Routhleck in #612 - [docs] Add colab link for documentation notebooks by @Routhleck in #614
- Update requirements-doc.txt to fix doc building temporally by @chaoming0625 in #617
- [math] Rebase operator customization using MLIR registration interface by @chaoming0625 in #618
- [docs] Add kaggle link for documentation notebooks by @Routhleck in #619
- update requirements by @chaoming0625 in #620
- require
brainpylib>=0.2.6
forjax>=0.4.24
by @chaoming0625 in #622 - [tools] add
brainpy.tools.compose
andbrainpy.tools.pipe
by @chaoming0625 in #624 - doc hierarchy update by @chaoming0625 in #630
- Standardizing and generalizing object-oriented transformations by @chaoming0625 in #628
- fix #626 by @chaoming0625 in #631
- Fix delayvar not correct in concat mode by @CloudyDory in #632
- [dependency] remove hard dependency of
taichi
andnumba
by @Routhleck in #635 clear_buffer_memory()
support clearingarray
,compilation
, andnames
by @chaoming0625 in #639- add
brainpy.math.surrogate..Surrogate
by @chaoming0625 in #638 - Enable brainpy object as pytree so that it can be applied with
jax.jit
etc. directly by @chaoming0625 in #625 - Fix ci by @chaoming0625 in #640
- Clean taichi AOT caches by @chaoming0625 in #643
- [ci] Fix windows pytest fatal exception by @Routhleck in #644
- [math] Support more than 8 parameters of taichi gpu custom operator definition by @Routhleck in #642
- Doc for
brainpylib>=0.3.0
by @chaoming0625 in #645 - Find back updates by @chaoming0625 in #646
- Update installation instruction by @chaoming0625 in #651
- Fix delay bug by @chaoming0625 in #650
- update doc by @chaoming0625 in #652
- [math] Add new customize operators with
cupy
by @Routhleck in #653 - [math] Fix taichi custom operator on gpu backend by @Routhleck in #655
- update cupy operator custom doc by @chaoming0625 in #656
- version 2.6.0 by @chaoming0625 in #657
- Upgrade CI by @chaoming0625 in #658
New Contributors
- @CloudyDory made their first contribution in #632
Full Changelog: V2.5.0...V2.6.0
Version 2.5.0
This release contains many new features and fixes. It is the first release with a mature solution for Brain Dynamics Operator Customization on both CPU and GPU platforms.
New Features
- Add synapse projection with Delta synapse models through
brainpy.dyn.HalfProjDelta
andbrainpy.dyn.FullProjDelta
. - Add
brainpy.math.exprel
, and change the code in the corresponding HH neuron models to improve numerical computation accuracy. These changes can significantly improve the numerical integration accuracy of HH-like models under x32 computation. - Add
brainpy.reset_level()
decorator so that the state resetting order can be customized by users. - Add
brainpy.math.ein_rearrange
,brainpy.math.ein_reduce
, andbrainpy.math.ein_repeat
functions - Add
brainpy.math.scan
transformation. - Rebase all customized operators using Taichi JIT compiler. On the CPU platform, the speed performance can be boosted ten to hundred times. On the GPU platforms, the flexibility can be greatly improved.
- Many bug fixes.
- A new version of
brainpylib>=0.2.4
has been released, supporting operator customization through the Taichi compiler. The supported backends include Linux, Windows, MacOS Intel, and MacOS M1 platforms. Tutorials please see https://brainpy.readthedocs.io/en/latest/tutorial_advanced/operator_custom_with_taichi.html
What's Changed
- [docs] Add taichi customized operators tutorial by @Routhleck in #545
- [docs] Optimize tutorial code in
operator_custom_with_taichi.ipynb
of documentations by @Routhleck in #546 - [running] fix multiprocessing bugs by @chaoming0625 in #547
- [docs] Fix typo in docs by @Routhleck in #549
- ⬆️ Bump conda-incubator/setup-miniconda from 2 to 3 by @dependabot in #551
- updates by @chaoming0625 in #550
brainpy.math.defjvp
andbrainpy.math.XLACustomOp.defjvp
by @chaoming0625 in #554- ⬆️ Bump actions/setup-python from 4 to 5 by @dependabot in #555
- Fix
brainpy.math.ifelse
bugs by @chaoming0625 in #556 - [math & dyn] add
brainpy.math.exprel
, and change the code in the corresponding HH neuron models to improve numerical computation accuracy by @chaoming0625 in #557 - Update README by @chaoming0625 in #558
- [doc] add conductance neuron model tutorial by @chaoming0625 in #559
- Doc by @chaoming0625 in #560
- add
brainpy.math.functional_vector_grad
andbrainpy.reset_level()
decorator by @chaoming0625 in #561 - [math] change the internal implementation of surrogate function by @chaoming0625 in #562
- Math by @chaoming0625 in #563
- [doc] update citations by @chaoming0625 in #564
- add support for multi-class margin loss by @charlielam0615 in #566
- Support for Delta synapse projections by @chaoming0625 in #568
- [math] Add taichi customized operators(event csrmv, csrmv, jitconn event mv, jitconn mv) by @Routhleck in #553
- fix doc by @chaoming0625 in #571
- Fix default math parameter setting bug by @chaoming0625 in #572
- fix bugs in
brainpy.math.random.truncated_normal
by @chaoming0625 in #574 - [doc] fix doc by @chaoming0625 in #576
- fix bugs in truncated_normal; add TruncatedNormal init. by @charlielam0615 in #575
- [Dyn] Fix alpha synapse bugs by @ztqakita in #578
- fix
brainpy.math.softplus
andbrainpy.dnn.SoftPlus
by @chaoming0625 in #581 - add
TruncatedNormal
toinitialize.py
by @charlielam0615 in #583 - Fix
_format_shape
inrandom_inits.py
by @charlielam0615 in #584 - fix bugs in
truncated_normal
by @charlielam0615 in #585 - [dyn] fix warning of reset_state by @chaoming0625 in #587
- [math] upgrade variable retrival by @chaoming0625 in #589
- [math & dnn] add
brainpy.math.unflatten
andbrainpy.dnn.Unflatten
by @chaoming0625 in #588 - [math] add
ein_rearrange
,ein_reduce
, andein_repeat
functions by @chaoming0625 in #590 - [math] Support taichi customized op with metal cpu backend by @Routhleck in #579
- Doc fix and standardize Dual Exponential model again by @chaoming0625 in #591
- update doc, upgrade reset_state, update projection models by @chaoming0625 in #592
- [taichi] Make taichi caches more transparent and Add clean caches function by @Routhleck in #596
- [test] remove test skip on macos, since brainpylib supports taichi interface on macos by @chaoming0625 in #597
- [dyn] add
clear_input
in thestep_run
function. by @chaoming0625 in #601 - [math] Refactor taichi operators by @Routhleck in #598
- [math] fix
brainpy.math.scan
by @chaoming0625 in #604 disable_ jit
support inbrainpy.math.scan
by @chaoming0625 in #606- [math] Remove the logs that
taichi.init()
print by @Routhleck in #609 - Version control in Publish.yml CI by @chaoming0625 in #610
New Contributors
- @charlielam0615 made their first contribution in #566
Full Changelog: V2.4.6...V2.5.0
Version 2.4.6
This release contains more than 130 commit updates, and has provided several new features.
New Features
1. surrogate gradient functions are more transparent.
New instances can be used to compute the surrogate gradients. For example:
import brainpy.math as bm
fun = bm.surrogate.Sigmoid()
# forward function
spk = fun(membrane_potential)
# backward function
dV = fun.surrogate_grad(1., membrane_potential)
# surrogate forward function
surro_spk = fun.surrogate_fun(membrane_potential)
2. Add brainpy.math.eval_shape
for evaluating the all dynamical variables used in the target function.
This function is similar to jax.eval_shape
which has no FLOPs, while it can extract all variables used in the target function. For example:
net = ... # any dynamical system
inputs = ... # inputs to the dynamical system
variables, outputs= bm.eval_shape(net, inputs)
# "variables" are all variables used in the target "net"
In future, this function will be used everywhere to transform all jax transformations into brainpy's oo transformations.
3. Generalize tools and interfaces for state managements.
For a single object:
- The
.reset_state()
defines the state resetting of all local variables in this node. - The
.load_state()
defines the state loading from external disks (typically, a dict is passed into this.load_state()
function). - The
.save_state()
defines the state saving to external disks (typically, the.save_state()
function generates a dict containing all variable values).
Here is an example to define a full class of brainpy.DynamicalSystem
.
import brainpy as bp
class YouDynSys(bp.DynamicalSystem):
def __init__(self, ): # define parameters
self.par1 = ....
self.num = ...
def reset_state(self, batch_or_mode=None): # define variables
self.a = bp.init.variable_(bm.zeros, (self.num,), batch_or_mode)
def load_state(self, state_dict): # load states from an external dict
self.a.value = bm.as_jax(state_dict['a'])
def save_state(self): # save states as an external dict
return {'a': self.a.value}
For a complex network model, brainpy provide unified state managment interface for initializing, saving, and loading states.
- The
brainpy.reset_state()
defines the state resetting of all variables in this node and its children nodes. - The
brainpy.load_state()
defines the state loading from external disks of all variables in the node and its children. - The
brainpy.save_state()
defines the state saving to external disks of all variables in the node and its children. - The
brainpy.clear_input()
defines the clearing of all input variables in the node and its children.
4. Unified brain simulation and brain-inspired computing interface through automatic membrane scaling.
The same model used in brain simulation can be easily transformed into the one used for brain-inspired computing for training. For example,
class EINet(bp.DynSysGroup):
def __init__(self):
super().__init__()
self.N = bp.dyn.LifRefLTC(4000, V_rest=-60., V_th=-50., V_reset=-60., tau=20., tau_ref=5.,
V_initializer=bp.init.Normal(-55., 2.))
self.delay = bp.VarDelay(self.N.spike, entries={'I': None})
self.E = bp.dyn.ProjAlignPost1(
comm=bp.dnn.EventCSRLinear(bp.conn.FixedProb(0.02, pre=3200, post=4000), weight=bp.init.Normal(0.6, 0.01)),
syn=bp.dyn.Expon(size=4000, tau=5.),
out=bp.dyn.COBA(E=0.),
post=self.N
)
self.I = bp.dyn.ProjAlignPost1(
comm=bp.dnn.EventCSRLinear(bp.conn.FixedProb(0.02, pre=800, post=4000), weight=bp.init.Normal(6.7, 0.01)),
syn=bp.dyn.Expon(size=4000, tau=10.),
out=bp.dyn.COBA(E=-80.),
post=self.N
)
def update(self, input):
spk = self.delay.at('I')
self.E(spk[:3200])
self.I(spk[3200:])
self.delay(self.N(input))
return self.N.spike.value
# used for brain simulation
with bm.environment(mode=bm.nonbatching_mode):
net = EINet()
# used for brain-inspired computing
# define the `membrane_scaling` parameter
with bm.environment(mode=bm.TrainingMode(128), membrane_scaling=bm.Scaling.transform([-60., -50.])):
net = EINet()
5. New apis for operator customization on CPU and GPU devices through brainpy.math.XLACustomOp
.
Starting from this release, brainpy introduces Taichi for operator customization. Now, users can write CPU and GPU operators through numba and taichi syntax on CPU device, and taichi syntax on GPu device. Particularly, to define an operator, user can use:
import numba as nb
import taichi as ti
import numpy as np
import jax
import brainpy.math as bm
@nb.njit
def numba_cpu_fun(a, b, out_a, out_b):
out_a[:] = a
out_b[:] = b
@ti.kernel
def taichi_gpu_fun(a, b, out_a, out_b):
for i in range(a.size):
out_a[i] = a[i]
for i in range(b.size):
out_b[i] = b[i]
prim = bm.XLACustomOp(cpu_kernel=numba_cpu_fun, gpu_kernel=taichi_gpu_fun)
a2, b2 = prim(np.random.random(1000), np.random.random(1000),
outs=[jax.ShapeDtypeStruct(1000, dtype=np.float32),
jax.ShapeDtypeStruct(1000, dtype=np.float32)])
6. Generalized STDP models which are compatible with diverse synapse models.
See https://github.com/brainpy/BrainPy/blob/master/brainpy/_src/dyn/projections/tests/test_STDP.py
What's Changed
- [bug] fix compatible bug by @chaoming0625 in #508
- [docs] add low-level op customization by @ztqakita in #507
- Compatible with
jax==0.4.16
by @chaoming0625 in #511 - updates for parallelization support by @chaoming0625 in #514
- Upgrade surrogate gradient functions by @chaoming0625 in #516
- [doc] update operator customization by @chaoming0625 in #517
- Updates for OO transforma and surrogate functions by @chaoming0625 in #519
- [dyn] add neuron scaling by @ztqakita in #520
- State saving, loading, and resetting by @chaoming0625 in #521
- [delay] rewrite previous delay APIs so that they are compatible with new brainpy version by @chaoming0625 in #522
- [projection] upgrade projections so that APIs are reused across different models by @chaoming0625 in #523
- [math] the interface for operator registration by @chaoming0625 in #524
- FIx bug in Delay by @ztqakita in #525
- Fix bugs in membrane scaling by @ztqakita in #526
- [math] Implement taichi op register by @Routhleck in #527
- Link libtaichi_c_api.so when import brainpylib by @Routhleck in #528
- update taichi op customization by @chaoming0625 in #529
- Fix error message by @HoshinoKoji in #530
- [math] remove the hard requirement of
taichi
by @chaoming0625 in #531 - [math] Resolve encoding of source kernel when ti.func is nested in ti… by @Routhleck in #532
- [math] new abstract function for XLACustomOp, fix its bugs by @chaoming0625 in #534
- [math] fix numpy array priority by @chaoming0625 in #533
- [brainpy.share] add category shared info by @chaoming0625 in #535
- [doc] update documentations by @chaoming0625 in #536
- [doc] update doc by @chaoming0625 in #537
- [dyn] add
brainpy.reset_state()
andbrainpy.clear_input()
for more consistent and flexible state managements by @chaoming0625 in #538 - [math] simplify the taichi AOT operator customization interface by @chaoming0625 in #540
- [dyn] add
save_state
,load_state
,reset_state
, andclear_input
helpers by @chaoming0625 in #542 - [dyn] update STDP APIs on CPUs and fix bugs by @chaoming0625 in #543
New Contributors
- @HoshinoKoji made their first contribution in #530
Full Changelog: V2.4.5...V2.4.6
Version 2.4.5
New Features
- A new version of
brainpylib==0.1.10
has been released. In this release, we have fixed some bugs of brainpy dedicated GPU operators. Users can freely use them in any application. - Correspondingly, dedicated operators in
brainpy.math
have been refined. .tracing_variable()
has been created to support tracingVariable
s during computations and compilations. Example usage please see #472- Add a new random API for creating multiple random keys:
brainpy.math.random.split_keys()
. - Fix bugs, including
brainpy.dnn.AllToAll
module- RandomState.
brainpy.math.cond
andbrainpy.math.while_loop
when variables are used in both branches
What's Changed
- Creat random key automatically when it is detected by @chaoming0625 in #461
- [encoding] upgrade encoding methods by @chaoming0625 in #464
- fix #466 by @chaoming0625 in #467
- Update operators for compatible with
brainpylib>=0.1.10
by @chaoming0625 in #468 - Support tracing
Variable
during computation and compilation by usingtracing_variable()
function by @chaoming0625 in #472 - Add code of conduct and contributing guides by @chaoming0625 in #473
- add Funding and Development roadmap by @chaoming0625 in #475
- Create SECURITY.md by @chaoming0625 in #474
- Create dependabot.yml by @chaoming0625 in #476
- update maintainence info in README by @chaoming0625 in #479
- ⬆️ Bump actions/setup-python from 2 to 4 by @dependabot in #477
- ⬆️ Bump actions/checkout from 2 to 4 by @dependabot in #478
- ad acknowledgment.md by @chaoming0625 in #482
- update quickstart of
simulating a brain dynamics model
with new APIs by @chaoming0625 in #483 - update advanced tutorials by @chaoming0625 in #484
- [docs] Update installation.rst by @Routhleck in #485
- update requirements by @chaoming0625 in #486
- [doc] update docs by @chaoming0625 in #487
- [doc] update docs by @chaoming0625 in #488
- Decouple Online and Offline training algorithms as
brainpy.mixin.SupportOnline
andbrainpy.mixin.SupportOffline
by @chaoming0625 in #489 - [dyn] add STDP_Song2000 LTP model by @ztqakita in #481
- update STDP by @chaoming0625 in #491
- [doc] update the API of
brainpy.dyn
module & add synaptic plasticity module by @chaoming0625 in #492 - fix bug by @chaoming0625 in #493
- [math] fix bugs in
cond
andwhile_loop
when same variables are used in both branches by @chaoming0625 in #494 - [docs] add BrainPy docker and docs by @ztqakita in #496
- [docs] update README and installation by @ztqakita in #499
- ⬆️ Bump docker/build-push-action from 4 to 5 by @dependabot in #498
- ⬆️ Bump docker/login-action from 2 to 3 by @dependabot in #497
- Add strings in bp._src.dyn.bio_models and abstract_models by @AkitsuFaye in #500
- [reset] update logics of state reset in
DynamicalSystem
by @chaoming0625 in #501 - [doc] upgrade docs with the latest APIs, fix #463 by @chaoming0625 in #502
- [doc] add synapse model documentations by @chaoming0625 in #503
- Changed the order of code blocks in the docs of hh models and lif models by @AkitsuFaye in #505
- [mode] move recurrent models in brainpy.dnn model into
brainpy.dyn
module by @chaoming0625 in #506
New Contributors
- @dependabot made their first contribution in #477
Full Changelog: V2.4.4...V2.4.5
Version 2.4.4
This release has fixed several bugs and updated the sustainable documentation.
What's Changed
- [mixin] abstract the behavior of supporting input projection by
brainpy.mixin.ReceiveInputProj
by @chaoming0625 in #428 - Update delays, models, and projections by @chaoming0625 in #429
- Compatible with
jax=0.4.14
by @chaoming0625 in #431 - Add new tests by @yygf123 in #430
- Add NonBatchingMode function by @yygf123 in #433
- [connect] Complete
FixedTotalNum
class and fix bugs by @Routhleck in #434 - Update the document "Concept 2: Dynamical System" by @yygf123 in #435
- [docs] Update three part of tutorial toolbox by @Routhleck in #436
- [docs] Update index.rst for surrogate gradient by @Routhleck in #437
- Reconstruct BrainPy documentations by @ztqakita in #438
- Renew doc requirements.txt by @ztqakita in #441
- Compatibility updates by @chaoming0625 in #442
- update docs by @chaoming0625 in #443
- Update optimizer by @yygf123 in #451
- [docs] Update custom saving and loading by @Routhleck in #439
- [doc] add new strings in bp._src.dyn.hh.py and bp._src.dyn.lif.py by @AkitsuFaye in #454
- Serveral updates by @chaoming0625 in #452
- Update doc bug in index.rst by @chaoming0625 in #458
- add
brainpy.dyn.Alpha
synapse model by @chaoming0625 in #459 - [doc] update ODE doc by @chaoming0625 in #460
New Contributors
- @AkitsuFaye made their first contribution in #454
Full Changelog: V2.4.3...V2.4.4
Version 2.4.3
This release has standardized the modeling of DNN and SNN models by two intercorrelated packages: brainpy.dnn
and brainpy.dyn
.
Overall, the modeling of brain dynamics in this release has the following advantages:
- the automatic merging of the duplicate synapses, keeping the minimal device memory
- easy model and data parallelization across multiple devices
- easy integration with artificial neural networks
- a new abstraction that decouples dynamics from communication
- the unified
DynamicalSystem
interface
New Features
- Support to define ion channel models which rely on multiple ions. For example,
class HH(bp.dyn.CondNeuGroup):
def __init__(self, size):
super().__init__(size)
self.k = bp.dyn.PotassiumFixed(size)
self.ca = bp.dyn.CalciumFirstOrder(size)
self.kca = bp.dyn.mix_ions(self.k, self.ca) # Ion that mixing Potassium and Calcium
self.kca.add_elem(ahp=bp.dyn.IAHP_De1994v2(size)) # channel that relies on both Potassium and Calcium
- New style
.update()
function inbrainpy.DynamicalSystem
which resolves all compatible issues. Starting from this version, allupdate()
no longer needs to receive a global shared argument such astdi
.
class YourDynSys(bp.DynamicalSystem):
def update(self, x):
t = bp.share['t']
dt = bp.share['dt']
i = bp.share['i']
...
-
Optimize the connection-building process when using
brainpy.conn.ScaleFreeBA
,brainpy.conn.ScaleFreeBADual
,brainpy.conn.PowerLaw
-
New dual exponential model
brainpy.dyn.DualExponV2
can be aligned with post dimension. -
More synaptic projection abstractions, including
brainpy.dyn.VanillaProj
brainpy.dyn.ProjAlignPostMg1
brainpy.dyn.ProjAlignPostMg2
brainpy.dyn.ProjAlignPost1
brainpy.dyn.ProjAlignPost2
brainpy.dyn.ProjAlignPreMg1
brainpy.dyn.ProjAlignPreMg2
-
Fix compatible issues, fix unexpected bugs, and improve the model tests.
What's Changed
- [connect] Optimize the connector about ScaleFreeBA, ScaleFreeBADual, PowerLaw by @Routhleck in #412
- [fix] bug of
connect.base.py
'srequire
function by @Routhleck in #413 - Many Updates by @chaoming0625 in #414
- Update docs by @chaoming0625 in #415
- fix conflict by @yygf123 in #416
- add a new implementation of Dual Exponential Synapse model which can be aligned post. by @chaoming0625 in #417
- Enable test when pull requests by @chaoming0625 in #418
- Add random.seed() by @yygf123 in #419
- Remove windows CI because it always generates strange errors by @chaoming0625 in #420
- Recent updates by @chaoming0625 in #421
- upgrade Runner and Trainer for new style of
DynamicalSystem.update()
function by @chaoming0625 in #422 - update docs by @chaoming0625 in #424
- fix
lif
model bugs and support two kinds of spike reset:soft
andhard
by @chaoming0625 in #423 - rewrite old synapses with decomposed components by @chaoming0625 in #425
- fix autograd bugs by @chaoming0625 in #426
New Contributors
Full Changelog: V2.4.2...V2.4.3
Version 2.4.2
We are very excited to release this new version of BrainPy V2.4.2. In this new update, we cover several exciting features:
New Features
- Reorganize the model to decouple dynamics and communication.
- Add
brainpy.dyn
for dynamics models andbrainpy.dnn
for the ANN layer and connection structures. - Supplement many docs for dedicated operators and common bugs of BrainPy.
- Fix many bugs.
What's Changed
- [ANN] add more activation functions by @chaoming0625 in #379
- Optimize Gaussian Decay initializer by @Routhleck in #381
- [update] new loss functions, surrograte base class, Array built-in functions by @chaoming0625 in #383
- [parallelization] new module of
brainpy.pnn
for auto parallelization of brain models by @chaoming0625 in #385 - [fix] fix the bug of loading states by @chaoming0625 in #388
- [math] support
jax.disable_jit()
for debugging by @chaoming0625 in #389 - [initialize] speed up
brainpy.init.DOGDecay
by @chaoming0625 in #390 - [doc] fix doc build by @chaoming0625 in #391
- Add deprecations for deprecated APIs or functions by @chaoming0625 in #393
- [math] enable debugging for new style of transformations in BrainPy by @chaoming0625 in #392
- [math] flow control updates by @chaoming0625 in #396
- Test of rates by @shangyangli in #386
- Add math docs: NumPy-like operations and Dedicated operators by @c-xy17 in #395
- [doc] documentation about
how to debug
andcommon gotchas
by @chaoming0625 in #397 - Update requirements-doc.txt by @chaoming0625 in #399
- debug (images not displayed) by @c-xy17 in #400
- Decouple dynamics and comminucations by @chaoming0625 in #401
- [fix] bugs of control flows by @chaoming0625 in #404
- Test for channels, neurons and synapses. by @ztqakita in #403
- Implement function to visualize connection matrix by @Routhleck in #405
- Optimize GaussianProb by @Routhleck in #406
- [dyn] add reduce models, HH-type models and channels by @ztqakita in #408
- [dnn] add various linear layers by @chaoming0625 in #407
- [delay]
VariableDelay
andDataDelay
by @chaoming0625 in #409 - [dyn] add COBA examples using the interface of new
brainpy.dyn
module by @chaoming0625 in #410 - [dyn] Update dyn.neurons docs and fix several bugs by @ztqakita in #411
New Contributors
- @shangyangli made their first contribution in #386
Full Changelog: V2.4.1...V2.4.2
Version 2.4.1
New Features
- [math] Support the error report when modifying a
brainpy.math.Array
during compilation - [math] add
brainpy.math.event
,brainpy.math.sparse
andbrainpy.math.jitconn
module, needsbrainpylib >= 0.1.9
- [interoperation] add apis and docs for
brainpy.layers.FromFlax
andbrainpy.layer.ToFlaxRNNCell
- [fix] Bug fixes:
- fix WilsonCowan bug
- fix
brainpy.connect.FixedProb
bug - fix analysis jit bug
What's Changed
- Update structures by @chaoming0625 in #364
- create blocksparse matrix matrix multiplication opearator by @Routhleck in #365
- commit by @grysgreat in #367
- Fix bugs by @chaoming0625 in #368
- [math] update dedicated operators by @chaoming0625 in #370
- fix bugs by @chaoming0625 in #371
- [bug] fix merging bug by @chaoming0625 in #372
- [structure] update package structure by @chaoming0625 in #369
- [test] update csrmv tests by @chaoming0625 in #373
- [interoperation] add apis and docs for
brainpy.layers.FromFlax
andbrainpy.layer.ToFlaxRNNCell
by @chaoming0625 in #374 - [doc] update documentation by @chaoming0625 in #375
- [bug] fix
brainpy.connect.FixedProb
bug by @chaoming0625 in #376 - [bug] fix analysis jit bug by @chaoming0625 in #377
- update brainpylib requirements by @chaoming0625 in #378
New Contributors
- @Routhleck made their first contribution in #365
- @grysgreat made their first contribution in #367
Full Changelog: V2.4.0...V2.4.1
Version 2.4.0
This branch of releases (brainpy==2.4.x
) are going to support the large-scale modeling for brain dynamics.
As the start, this release provides support for automatic object-oriented (OO) transformations.
What's New
-
Automatic OO transformations on longer need to take
dyn_vars
orchild_objs
information.
These transformations are capable of automatically inferring the underlying dynamical variables.
Specifically, they include:brainpy.math.grad
and other autograd functionalitiesbrainpy.math.jit
brainpy.math.for_loop
brainpy.math.while_loop
brainpy.math.ifelse
brainpy.math.cond
-
Update documentation
-
Fix several bugs
What's Changed
- reorganize operators in
brainpy.math
by @chaoming0625 in #357 - Automatic transformations any function/object using
brainpy.math.Variable
by @chaoming0625 in #358 - New OO transforms support
jax.disable_jit
mode by @chaoming0625 in #359 - [oo transform] Enable new style of jit transformation to support
static_argnums
andstatic_argnames
by @chaoming0625 in #360 - [documentation] update documentation to brainpy>=2.4.0 by @chaoming0625 in #361
Full Changelog: V2.3.8...V2.4.0
Version 2.3.8
This release continues to add support for improving the usability of BrainPy.
New Features
- New data structures for object-oriented transformations.
NodeList
andNodeDict
for a list/tuple/dict ofBrainPyObject
instances.ListVar
andDictVar
for a list/tuple/dict of brainpy data.
Clip
transformation for brainpy initializers.- All
brainpylib
operators are accessible inbrainpy.math
module. Especially there are some dedicated operators for scaling up the million-level neuron networks. For an example, see example in Simulating 1-million-neuron networks with 1GB GPU memory - Enable monitoring GPU models on CPU when setting
DSRunner(..., memory_efficient=True)
. This setting can usually reduce so much memory usage. brainpylib
wheels on the Linux platform support the GPU operators. Users can install GPU version ofbrainpylib
(requirebrainpylib>=0.1.7
) directly bypip install brainpylib
. @ztqakita
What's Changed
- Fix bugs and add more variable structures:
ListVar
andDictVar
by @chaoming0625 in #345 - add CI for testing various models by @chaoming0625 in #346
- Update docs and tests by @chaoming0625 in #347
- Fix `Runner(jit=False)`` bug by @chaoming0625 in #348
- Compatible with jax>=0.4.7 by @chaoming0625 in #349
- Updates by @chaoming0625 in #350
- reconstruct BrainPy by merging brainpylib by @ztqakita in #351
- Intergate brainpylib operators into brainpy by @chaoming0625 in #352
- fix
brainpylib
call bug by @chaoming0625 in #354 - Enable memory-efficient
DSRunner
by @chaoming0625 in #355 - fix
Array
transform bug by @chaoming0625 in #356
Full Changelog: V2.3.7...V2.3.8