Skip to content

Releases: brainpy/BrainPy

Version 2.3.0

Choose a tag to compare

@chaoming0625 chaoming0625 released this 19 Dec 11:25
ac1ac12

This branch of releases aims to provide a unified computing framework for brain simulation and brain-inspired computing.

New features

  1. brainpy.BPTT supports train_data and test_data with general Python iterators. For instance, one can train a model with PyTorch dataloader or TensorFlow datasets.
import torchvision
from torch.utils.data import DataLoader
data = torchvision.datasets.CIFAR10("./CIFAR10", train=False, transform=torchvision.transforms.ToTensor())
loader = DataLoader(dataset=data, batch_size=4, shuffle=True, num_workers=0, drop_last=False)

# any generator can be used for train_data or test_data
trainer = bp.BPTT()
trainer.fit(loader)
  1. Consolidated object-oriented transformation in brainpy.math.object_transform module. All brainpy transformations generate a new BrainPyObject instance so that objects in brainpy can be composed hierarchically. brainpy.math.to_object() transformation transforms a pure Python function into a BrainPyObject.

  2. New documentation is currently online for introducing the consolidated BrainPy concept of object-oriented transformation.

  3. Change brainpy.math.JaxArray to brainpy.math.Array.

Deprecations

  1. brainpy.datasets module is no longer supported. New APIs will be moved into brainpy-datasets package.
  2. brainpy.train.BPTT no longer support to receive the train data [X, Y]. Instead, users should provide a data generator such like pytorch dataset or tensorflow dataset.
  3. The update function of brainpy.math.TimeDealy does not support receiving a time index. Instead, one can update the new data by directly using TimeDealy.update(data) instead of TimeDealy.update(time, data).
  4. Fix the monitoring error of delay differential equations with brainpy.integrators.IntegratorRunner.

Bug Fixes

  1. Fix the bug on One2One connection.
  2. Fix the bug in eprop example.
  3. Fix ij2csr transformation error.
  4. Fix test bugs

What's Changed

Full Changelog: V2.2.4.0...V2.3.0

Version 2.2.4.0

Choose a tag to compare

@chaoming0625 chaoming0625 released this 29 Nov 04:03
af185c5

This release has updated many functionalities and fixed several bugs in BrainPy.

New Features

  1. More ANN layers, including brainpy.layers.Flatten and brainpy.layers.Activation.
  2. Optimized connection building for brainpy.connect module.
  3. cifar dataset.
  4. Enhanced API and Doc for parallel simulations via brainpy.running.cpu_ordered_parallel, brainpy.running.cpu_unordered_parallel, brainpy.running.jax_vectorize_map and brainpy.running.jax_parallelize_map.

What's Changed

New Contributors

Full Changelog: V2.2.3.6...V2.2.4

Version 2.2.3.6

Choose a tag to compare

@chaoming0625 chaoming0625 released this 08 Nov 14:24
1e9c8c2
  • fix bifurcation analysis bug
  • fix synaptic delay bug

Version 2.2.3.5

Choose a tag to compare

@chaoming0625 chaoming0625 released this 05 Nov 03:21
147d3e8
fix `parameter()` bug (#286)

fix `parameter()` bug

Version 2.2.3.4

Choose a tag to compare

@chaoming0625 chaoming0625 released this 04 Nov 05:24
f3e7d72

New features

  1. This release removes the extensions package, and deploys it as a standalone repository as brainpylib.
  2. Initializing brainpy.math.random.RandomState with seed_or_key, rather than seed.
  3. APIs in brainpy.measure supports loop and vmap methods, the former is memory-efficient, and the later is faster.
  4. DNN layers are revised and are all useable.
  5. Upgrade operators to match brainpylib>=0.1.1
  6. brainpy.math.pre2post_event_sum supports atuodiff (including JVP, VJP), it can be used for SNN training.

Full Changelog: V2.2.3.3...V2.2.3.4

Version 2.2.3.3

Choose a tag to compare

@chaoming0625 chaoming0625 released this 18 Oct 13:45
daf5002
fix delay update bug (#281

fix delay update bug

Version 2.2.3.2

Choose a tag to compare

@chaoming0625 chaoming0625 released this 18 Oct 12:45
87c0b86

This release continuously improves the functionality of BrainPy

New features

  1. Add brainpy.measure.unitary_LFP() for calculating LFP from neuronal spikes
>>> import brainpy as bp
>>> runner = bp.DSRunner()
>>> runner.run(100)
>>> lfp = bp.measure.unitary_LFP(runner.mon.ts, runner.mon['exc.spike'], 'exc')
>>> lfp += bp.measure.unitary_LFP(runner.mon.ts, runner.mon['inh.spike'], 'inh')
  1. Add brainpy.synapses.PoissonInput model
>>> bp.synapse.PoissonInput(target_variable, num_input, freq, weight)
  1. Upgrade brainpy connection methods, improving its speeds. New customization of brainpy Connector can be implemented through
class YourConnector(bp.conn.TwoEndConnector):
  def build_csr(self):
     pass

  def build_coo(self):
    pass

  def build_mat(self):
    pass

Improvements

  1. Support transformation contexts for JaxArray, and improve the error checking of JaxArray updating in a JIT function.

  2. Speedup delay retrieval by reversing delay variable data.

  3. Improve the operator customization methods by using Numba functions.

  4. Fix bugs in GPU operators in brainpylib.

What's Changed

Full Changelog: V2.2.3.1...V2.2.3.2

Version 2.2.3.1

Choose a tag to compare

@chaoming0625 chaoming0625 released this 05 Oct 07:18
62a1220

This release fixes the installation on Windows systems and improves the installation guides in the official documentation and installation process.

The following example shows how to install jaxlib after users install and import brainpy:

>>> import brainpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\adadu\miniconda3\envs\py3test\lib\site-packages\brainpy\__init__.py", line 10, in <module>
    raise ModuleNotFoundError(

BrainPy needs jaxlib, please install jaxlib.

1. If you are using Windows system, install jaxlib through

   >>> pip install jaxlib -f https://whls.blob.core.windows.net/unstable/index.html

2. If you are using macOS platform, install jaxlib through

   >>> pip install jaxlib -f https://storage.googleapis.com/jax-releases/jax_releases.html

3. If you are using Linux platform, install jaxlib through

   >>> pip install jaxlib -f https://storage.googleapis.com/jax-releases/jax_releases.html

4. If you are using Linux + CUDA platform, install jaxlib through

   >>> pip install jaxlib -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

Note that the versions of "jax" and "jaxlib" should be consistent, like "jax=0.3.14", "jaxlib=0.3.14".

More detail installation instruction, please see https://brainpy.readthedocs.io/en/latest/quickstart/installation.html#dependency-2-jax  

Hope this information may help the installation of BrainPy much easiler.

Version 2.2.3

Choose a tag to compare

@chaoming0625 chaoming0625 released this 04 Oct 11:22
174c81a

This release continues to improve the usability of BrainPy.

New Features

  1. Operations among a JaxArray and a NumPy ndarray in a JIT function no longer cause errors.
>>> import numpy as np
>>> import brainpy.math as bm
>>> f = bm.jit(lambda: bm.random.random(3) + np.ones(1))
>>> f
JaxArray([1.2022058, 1.683937 , 1.3586301], dtype=float32)
  1. Initializing a brainpy.math.Variable according to the data shape.
>>> bm.Variable(10, dtype=bm.float32)
Variable([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], dtype=float32)
  1. LengthDelay supports a new method called "concatenate" which is compatible with BP training.
>>> delay = bm.LengthDelay(bm.ones(3), 10, update_method='concatenate')
>>> delay.update(bm.random.random(3))
>>> delay.retrieve(0)
DeviceArray([0.17887115, 0.6738142 , 0.75816643], dtype=float32)
>>> delay.retrieve(10)
DeviceArray([0., 0., 0.], dtype=float32)

Note that compared with the default updating method "rotation", this method can be used to train delay models with BP algorithms. However, "concatenate" has a slower speed for delay processing.

  1. Support customizing the plotting styles of fixed points. However, there is still work to support flexible plotting of analyzed results.
>>> from brainpy.analysis import plotstyle, stability
>>> plotstyle.set_plot_schema(stability.SADDLE_NODE, marker='*', markersize=15)

Full Changelog: V2.2.2...V2.2.3

What's Changed

Full Changelog: V2.2.2...V2.2.3

Version 2.2.2

Choose a tag to compare

@chaoming0625 chaoming0625 released this 28 Sep 12:33
e25144e

Bug Fixes

This release fixes several bugs in the BrainPy system, including:

  • The jitted functions in brainpy.measure module no longer exists when they are cleared by brainpy.math.clear_memory_buffer().
  • The bug for clear_input() function.
  • The bug for the monitor in brainpy.integrators.IntegratorRunner

What's Changed

Full Changelog: V2.2.1...V2.2.2