Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[readme] Update README.md #697

Merged
merged 7 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ jobs:
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
pip uninstall brainpy -y
python setup.py install
pip install jax==0.4.30
pip install jaxlib==0.4.30
- name: Test with pytest
run: |
cd brainpy
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ We provide a Binder environment for BrainPy. You can use the following button to

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/brainpy/BrainPy-binder/main)

## Brain Dynamics Programming Ecosystem

We are building an ecosystem for bain dynamics programming (BDP), evolving from our previously experimental [BrainPy package](https://github.com/brainpy/BrainPy).

The BDP ecosystem is a collection of tools, libraries, and frameworks that can be used to build brain dynamics models and applications.

The BDP ecosystem is designed to be modular, so you can use as much or as little of it as you need.

The details for this ecosystem please see: https://ecosystem-for-brain-dynamics.readthedocs.io/

We welcome contributions from the community, so if you have an idea for a new tool or library, please let us know! Please email us at: <[email protected]>.



## Ecosystem

Expand Down
1 change: 1 addition & 0 deletions brainpy/_src/dnn/tests/test_activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import brainpy.math as bm



class Test_Activation(parameterized.TestCase):

@parameterized.product(
Expand Down
5 changes: 5 additions & 0 deletions brainpy/_src/dnn/tests/test_conv_layers.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# -*- coding: utf-8 -*-
import platform

import jax.numpy as jnp
import pytest
from absl.testing import absltest
from absl.testing import parameterized

import brainpy as bp
import brainpy.math as bm

if platform.system() == 'Darwin':
pytest.skip('skip Mac OS', allow_module_level=True)


class TestConv(parameterized.TestCase):
def test_Conv2D_img(self):
Expand Down
9 changes: 7 additions & 2 deletions brainpy/_src/math/op_register/ad_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,14 @@ def _standard_jvp(jvp_rules, primitive: Primitive, primals, tangents, **params):
r = tuple(rule(t, *primals, **params))
tangents_out.append(r)
assert tree_util.tree_structure(r) == tree
return val_out, functools.reduce(_add_tangents,
try:
return val_out, functools.reduce(_add_tangents,
tangents_out,
tree_util.tree_map(lambda a: ad.Zero.from_value(a), val_out))
tree_util.tree_map(lambda a: ad.Zero.from_primal_value(a), val_out))
except:
return val_out, functools.reduce(_add_tangents,
tangents_out,
tree_util.tree_map(lambda a: ad.Zero.from_value(a), val_out))


def _add_tangents(xs, ys):
Expand Down